From 4a3ea8187ac472a6c44d4e37c30c72bbef9849cc Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Thu, 30 Oct 2025 06:13:52 -0700 Subject: [PATCH 01/17] Update CHANGELOG.md to include note on pinned API version (#2096) --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3eabb948d9..518c9e1fd51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## 30.1.0 - 2025-10-29 + +This release changes the pinned API version to `2025-10-29.clover`. + * [#2093](https://github.com/stripe/stripe-java/pull/2093) Update generated code * Improve docs for PaymentIntent related endpoints * [#2086](https://github.com/stripe/stripe-java/pull/2086) Update generated code From 081f377536e59ef5cb59928f9873133c12ebc6cf Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:13:22 +0000 Subject: [PATCH 02/17] Update generated code for v2109 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../stripe/model/v2/billing/MeterEvent.java | 3 +- .../com/stripe/model/v2/core/Account.java | 206 ++- .../param/v2/core/AccountCreateParams.java | 1227 +++++++++++++---- .../param/v2/core/AccountUpdateParams.java | 1173 +++++++++++++--- .../stripe/functional/GeneratedExamples.java | 8 +- 7 files changed, 2194 insertions(+), 427 deletions(-) diff --git a/API_VERSION b/API_VERSION index 6ab1f382f90..573f1065e76 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -07c094f7c1f64823539941252667a6620cc6bb44 \ No newline at end of file +a9b4d5059aeb24192ebc26c24160bb6e495bd6cb \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 93363663de4..922ac626dbb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2108 \ No newline at end of file +v2109 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/v2/billing/MeterEvent.java b/src/main/java/com/stripe/model/v2/billing/MeterEvent.java index 698c1693576..ac2b0fa94ad 100644 --- a/src/main/java/com/stripe/model/v2/billing/MeterEvent.java +++ b/src/main/java/com/stripe/model/v2/billing/MeterEvent.java @@ -48,7 +48,8 @@ public class MeterEvent extends StripeObject { /** * The payload of the event. This must contain the fields corresponding to a meter’s {@code * customer_mapping.event_payload_key} (default is {@code stripe_customer_id}) and {@code - * value_settings.event_payload_key} (default is {@code value}). Read more about the payload. + * value_settings.event_payload_key} (default is {@code value}). Read more about the payload.. */ @SerializedName("payload") Map payload; diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index ae678c427f9..86b756238f3 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -218,8 +218,8 @@ public static class AutomaticIndirectTax extends StripeObject { Location location; /** - * The data source used to identify the customer's tax location - defaults to - * 'identity_address'. Will only be used for automatic tax calculation on the customer's + * The data source used to identify the customer's tax location - defaults to {@code + * identity_address}. Will only be used for automatic tax calculation on the customer's * Invoices and Subscriptions. * *

One of {@code identity_address}, {@code ip_address}, {@code payment_method}, or {@code @@ -499,6 +499,10 @@ public static class Merchant extends StripeObject { @SerializedName("card_payments") CardPayments cardPayments; + /** Settings specific to Konbini payments on the account. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + /** * The merchant category code for the merchant. MCCs are used to classify businesses based on * the goods or services they provide. @@ -506,6 +510,10 @@ public static class Merchant extends StripeObject { @SerializedName("mcc") String mcc; + /** Settings for the default text that appears on statements for language variations. */ + @SerializedName("script_statement_descriptor") + ScriptStatementDescriptor scriptStatementDescriptor; + /** Settings used for SEPA debit payments. */ @SerializedName("sepa_debit_payments") SepaDebitPayments sepaDebitPayments; @@ -3263,6 +3271,140 @@ public static class DeclineOn extends StripeObject { } } + /** Settings specific to Konbini payments on the account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KonbiniPayments extends StripeObject { + /** Support for Konbini payments. */ + @SerializedName("support") + Support support; + + /** Support for Konbini payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Support extends StripeObject { + /** Support email address for Konbini payments. */ + @SerializedName("email") + String email; + + /** Support hours for Konbini payments. */ + @SerializedName("hours") + Hours hours; + + /** Support phone number for Konbini payments. */ + @SerializedName("phone") + String phone; + + /** Support hours for Konbini payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Hours extends StripeObject { + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("end_time") + String endTime; + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("start_time") + String startTime; + } + } + } + + /** Settings for the default text that appears on statements for language variations. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScriptStatementDescriptor extends StripeObject { + /** + * The Kana variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kana") + Kana kana; + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kanji") + Kanji kanji; + + /** + * The Kana variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kana extends StripeObject { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + } + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kanji extends StripeObject { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + } + } + /** Settings used for SEPA debit payments. */ @Getter @Setter @@ -3886,6 +4028,10 @@ public static class StatusDetail extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class HoldsCurrencies extends StripeObject { + /** Can hold storage-type funds on Stripe in EUR. */ + @SerializedName("eur") + Eur eur; + /** Can hold storage-type funds on Stripe in GBP. */ @SerializedName("gbp") Gbp gbp; @@ -3894,6 +4040,62 @@ public static class HoldsCurrencies extends StripeObject { @SerializedName("usd") Usd usd; + /** Can hold storage-type funds on Stripe in EUR. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Eur extends StripeObject { + /** Whether the Capability has been requested. */ + @SerializedName("requested") + Boolean requested; + + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code + * unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details regarding the status of the Capability. {@code status_details} + * will be empty if the Capability's status is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + /** Can hold storage-type funds on Stripe in GBP. */ @Getter @Setter diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index b0d4b07e0b4..7c0ba8c5dd4 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -567,8 +567,8 @@ public static class AutomaticIndirectTax { String ipAddress; /** - * The data source used to identify the customer's tax location - defaults to - * 'identity_address'. Will only be used for automatic tax calculation on the customer's + * The data source used to identify the customer's tax location - defaults to {@code + * identity_address}. Will only be used for automatic tax calculation on the customer's * Invoices and Subscriptions. */ @SerializedName("location_source") @@ -654,8 +654,8 @@ public Builder setIpAddress(String ipAddress) { } /** - * The data source used to identify the customer's tax location - defaults to - * 'identity_address'. Will only be used for automatic tax calculation on the customer's + * The data source used to identify the customer's tax location - defaults to {@code + * identity_address}. Will only be used for automatic tax calculation on the customer's * Invoices and Subscriptions. */ public Builder setLocationSource( @@ -1639,6 +1639,10 @@ public static class Merchant { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Settings specific to Konbini payments on the account. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + /** * The merchant category code for the Merchant Configuration. MCCs are used to classify * businesses based on the goods or services they provide. @@ -1646,6 +1650,10 @@ public static class Merchant { @SerializedName("mcc") String mcc; + /** Settings for the default text that appears on statements for language variations. */ + @SerializedName("script_statement_descriptor") + ScriptStatementDescriptor scriptStatementDescriptor; + /** Statement descriptor. */ @SerializedName("statement_descriptor") StatementDescriptor statementDescriptor; @@ -1660,7 +1668,9 @@ private Merchant( Capabilities capabilities, CardPayments cardPayments, Map extraParams, + KonbiniPayments konbiniPayments, String mcc, + ScriptStatementDescriptor scriptStatementDescriptor, StatementDescriptor statementDescriptor, Support support) { this.bacsDebitPayments = bacsDebitPayments; @@ -1668,7 +1678,9 @@ private Merchant( this.capabilities = capabilities; this.cardPayments = cardPayments; this.extraParams = extraParams; + this.konbiniPayments = konbiniPayments; this.mcc = mcc; + this.scriptStatementDescriptor = scriptStatementDescriptor; this.statementDescriptor = statementDescriptor; this.support = support; } @@ -1688,8 +1700,12 @@ public static class Builder { private Map extraParams; + private KonbiniPayments konbiniPayments; + private String mcc; + private ScriptStatementDescriptor scriptStatementDescriptor; + private StatementDescriptor statementDescriptor; private Support support; @@ -1702,7 +1718,9 @@ public AccountCreateParams.Configuration.Merchant build() { this.capabilities, this.cardPayments, this.extraParams, + this.konbiniPayments, this.mcc, + this.scriptStatementDescriptor, this.statementDescriptor, this.support); } @@ -1765,6 +1783,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Settings specific to Konbini payments on the account. */ + public Builder setKonbiniPayments( + AccountCreateParams.Configuration.Merchant.KonbiniPayments konbiniPayments) { + this.konbiniPayments = konbiniPayments; + return this; + } + /** * The merchant category code for the Merchant Configuration. MCCs are used to classify * businesses based on the goods or services they provide. @@ -1774,6 +1799,14 @@ public Builder setMcc(String mcc) { return this; } + /** Settings for the default text that appears on statements for language variations. */ + public Builder setScriptStatementDescriptor( + AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor + scriptStatementDescriptor) { + this.scriptStatementDescriptor = scriptStatementDescriptor; + return this; + } + /** Statement descriptor. */ public Builder setStatementDescriptor( AccountCreateParams.Configuration.Merchant.StatementDescriptor statementDescriptor) { @@ -6560,134 +6593,7 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class StatementDescriptor { - /** - * The default text that appears on statements for non-card charges outside of Japan. For - * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as - * the statement descriptor prefix. In that case, if concatenating the statement descriptor - * suffix causes the combined statement descriptor to exceed 22 characters, we truncate the - * statement_descriptor text to limit the full descriptor to 22 characters. For more - * information about statement descriptors and their requirements, see the Merchant - * Configuration settings documentation. - */ - @SerializedName("descriptor") - String descriptor; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Default text that appears on statements for card charges outside of Japan, prefixing any - * dynamic statement_descriptor_suffix specified on the charge. To maximize space for the - * dynamic part of the descriptor, keep this text short. If you don’t specify this value, - * statement_descriptor is used as the prefix. For more information about statement - * descriptors and their requirements, see the Merchant Configuration settings - * documentation. - */ - @SerializedName("prefix") - String prefix; - - private StatementDescriptor( - String descriptor, Map extraParams, String prefix) { - this.descriptor = descriptor; - this.extraParams = extraParams; - this.prefix = prefix; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String descriptor; - - private Map extraParams; - - private String prefix; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Configuration.Merchant.StatementDescriptor build() { - return new AccountCreateParams.Configuration.Merchant.StatementDescriptor( - this.descriptor, this.extraParams, this.prefix); - } - - /** - * The default text that appears on statements for non-card charges outside of Japan. For - * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as - * the statement descriptor prefix. In that case, if concatenating the statement - * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we - * truncate the statement_descriptor text to limit the full descriptor to 22 characters. - * For more information about statement descriptors and their requirements, see the - * Merchant Configuration settings documentation. - */ - public Builder setDescriptor(String descriptor) { - this.descriptor = descriptor; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountCreateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountCreateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Default text that appears on statements for card charges outside of Japan, prefixing - * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for - * the dynamic part of the descriptor, keep this text short. If you don’t specify this - * value, statement_descriptor is used as the prefix. For more information about statement - * descriptors and their requirements, see the Merchant Configuration settings - * documentation. - */ - public Builder setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Support { - /** A publicly available mailing address for sending support issues to. */ - @SerializedName("address") - Address address; - - /** A publicly available email address for sending support issues to. */ - @SerializedName("email") - String email; - + public static class KonbiniPayments { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -6698,25 +6604,13 @@ public static class Support { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A publicly available phone number to call with support issues. */ - @SerializedName("phone") - String phone; - - /** A publicly available website for handling support issues. */ - @SerializedName("url") - String url; + /** Support for Konbini payments. */ + @SerializedName("support") + Support support; - private Support( - Address address, - String email, - Map extraParams, - String phone, - String url) { - this.address = address; - this.email = email; + private KonbiniPayments(Map extraParams, Support support) { this.extraParams = extraParams; - this.phone = phone; - this.url = url; + this.support = support; } public static Builder builder() { @@ -6724,40 +6618,21 @@ public static Builder builder() { } public static class Builder { - private Address address; - - private String email; - private Map extraParams; - private String phone; - - private String url; + private Support support; /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Configuration.Merchant.Support build() { - return new AccountCreateParams.Configuration.Merchant.Support( - this.address, this.email, this.extraParams, this.phone, this.url); - } - - /** A publicly available mailing address for sending support issues to. */ - public Builder setAddress( - AccountCreateParams.Configuration.Merchant.Support.Address address) { - this.address = address; - return this; - } - - /** A publicly available email address for sending support issues to. */ - public Builder setEmail(String email) { - this.email = email; - return this; + public AccountCreateParams.Configuration.Merchant.KonbiniPayments build() { + return new AccountCreateParams.Configuration.Merchant.KonbiniPayments( + this.extraParams, this.support); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link AccountCreateParams.Configuration.Merchant.Support#extraParams} for the - * field documentation. + * map. See {@link AccountCreateParams.Configuration.Merchant.KonbiniPayments#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6770,8 +6645,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link AccountCreateParams.Configuration.Merchant.Support#extraParams} for the - * field documentation. + * map. See {@link AccountCreateParams.Configuration.Merchant.KonbiniPayments#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6781,32 +6656,20 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A publicly available phone number to call with support issues. */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } - - /** A publicly available website for handling support issues. */ - public Builder setUrl(String url) { - this.url = url; + /** Support for Konbini payments. */ + public Builder setSupport( + AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support support) { + this.support = support; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; - - /** - * Required. Two-letter country code (ISO 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + public static class Support { + /** Support email address for Konbini payments. */ + @SerializedName("email") + String email; /** * Map of extra parameters for custom features not available in this client library. The @@ -6818,43 +6681,20 @@ public static class Address { @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; + /** Support hours for Konbini payments. */ + @SerializedName("hours") + Hours hours; - /** Town or cho-me. */ - @SerializedName("town") - String town; + /** Support phone number for Konbini payments. */ + @SerializedName("phone") + String phone; - private Address( - String city, - String country, - Map extraParams, - String line1, - String line2, - String postalCode, - String state, - String town) { - this.city = city; - this.country = country; + private Support( + String email, Map extraParams, Hours hours, String phone) { + this.email = email; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; - this.town = town; + this.hours = hours; + this.phone = phone; } public static Builder builder() { @@ -6862,23 +6702,830 @@ public static Builder builder() { } public static class Builder { - private String city; - - private String country; + private String email; private Map extraParams; - private String line1; - - private String line2; + private Hours hours; - private String postalCode; + private String phone; - private String state; + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support build() { + return new AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support( + this.email, this.extraParams, this.hours, this.phone); + } - private String town; + /** Support email address for Konbini payments. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support hours for Konbini payments. */ + public Builder setHours( + AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours hours) { + this.hours = hours; + return this; + } + + /** Support phone number for Konbini payments. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hours { + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("end_time") + String endTime; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("start_time") + String startTime; + + private Hours(String endTime, Map extraParams, String startTime) { + this.endTime = endTime; + this.extraParams = extraParams; + this.startTime = startTime; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String endTime; + + private Map extraParams; + + private String startTime; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours + build() { + return new AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours( + this.endTime, this.extraParams, this.startTime); + } + + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + public Builder setEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + public Builder setStartTime(String startTime) { + this.startTime = startTime; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptStatementDescriptor { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Kana variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kana") + Kana kana; + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptStatementDescriptor(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor build() { + return new AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor#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 Kana variation of statement_descriptor used for charges in Japan. Japanese + * statement descriptors have special + * requirements. + */ + public Builder setKana( + AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana kana) { + this.kana = kana; + return this; + } + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese + * statement descriptors have special + * requirements. + */ + public Builder setKanji( + AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + + private Kana(String descriptor, Map extraParams, String prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String descriptor; + + private Map extraParams; + + private String prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana + build() { + return new AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + + private Kanji(String descriptor, Map extraParams, String prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String descriptor; + + private Map extraParams; + + private String prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji + build() { + return new AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StatementDescriptor { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement descriptor + * suffix causes the combined statement descriptor to exceed 22 characters, we truncate the + * statement_descriptor text to limit the full descriptor to 22 characters. For more + * information about statement descriptors and their requirements, see the Merchant + * Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing any + * dynamic statement_descriptor_suffix specified on the charge. To maximize space for the + * dynamic part of the descriptor, keep this text short. If you don’t specify this value, + * statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + + private StatementDescriptor( + String descriptor, Map extraParams, String prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String descriptor; + + private Map extraParams; + + private String prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.StatementDescriptor build() { + return new AccountCreateParams.Configuration.Merchant.StatementDescriptor( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Support { + /** A publicly available mailing address for sending support issues to. */ + @SerializedName("address") + Address address; + + /** A publicly available email address for sending support issues 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; + + /** A publicly available phone number to call with support issues. */ + @SerializedName("phone") + String phone; + + /** A publicly available website for handling support issues. */ + @SerializedName("url") + String url; + + private Support( + Address address, + String email, + Map extraParams, + String phone, + String url) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.phone = phone; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String email; + + private Map extraParams; + + private String phone; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Support build() { + return new AccountCreateParams.Configuration.Merchant.Support( + this.address, this.email, this.extraParams, this.phone, this.url); + } + + /** A publicly available mailing address for sending support issues to. */ + public Builder setAddress( + AccountCreateParams.Configuration.Merchant.Support.Address address) { + this.address = address; + return this; + } + + /** A publicly available email address for sending support issues 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 AccountCreateParams.Configuration.Merchant.Support#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.Support#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A publicly available phone number to call with support issues. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** A publicly available website for handling support issues. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Merchant.Support.Address build() { return new AccountCreateParams.Configuration.Merchant.Support.Address( this.city, @@ -8047,6 +8694,10 @@ public Builder setRequested(Boolean requested) { @Getter @EqualsAndHashCode(callSuper = false) public static class HoldsCurrencies { + /** Can hold storage-type funds on Stripe in EUR. */ + @SerializedName("eur") + Eur eur; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -8065,7 +8716,8 @@ public static class HoldsCurrencies { @SerializedName("usd") Usd usd; - private HoldsCurrencies(Map extraParams, Gbp gbp, Usd usd) { + private HoldsCurrencies(Eur eur, Map extraParams, Gbp gbp, Usd usd) { + this.eur = eur; this.extraParams = extraParams; this.gbp = gbp; this.usd = usd; @@ -8076,6 +8728,8 @@ public static Builder builder() { } public static class Builder { + private Eur eur; + private Map extraParams; private Gbp gbp; @@ -8085,7 +8739,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies build() { return new AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies( - this.extraParams, this.gbp, this.usd); + this.eur, this.extraParams, this.gbp, this.usd); + } + + /** Can hold storage-type funds on Stripe in EUR. */ + public Builder setEur( + AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Eur eur) { + this.eur = eur; + return this; } /** @@ -8133,6 +8794,88 @@ public Builder setUsd( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Eur { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Eur(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Eur + build() { + return new AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies + .Eur(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Eur#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Eur#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. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Gbp { diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index 89c16bbd4d6..bb966d0a272 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -634,8 +634,8 @@ public static class AutomaticIndirectTax { Object ipAddress; /** - * The data source used to identify the customer's tax location - defaults to - * 'identity_address'. Will only be used for automatic tax calculation on the customer's + * The data source used to identify the customer's tax location - defaults to {@code + * identity_address}. Will only be used for automatic tax calculation on the customer's * Invoices and Subscriptions. */ @SerializedName("location_source") @@ -744,8 +744,8 @@ public Builder setIpAddress(EmptyParam ipAddress) { } /** - * The data source used to identify the customer's tax location - defaults to - * 'identity_address'. Will only be used for automatic tax calculation on the customer's + * The data source used to identify the customer's tax location - defaults to {@code + * identity_address}. Will only be used for automatic tax calculation on the customer's * Invoices and Subscriptions. */ public Builder setLocationSource( @@ -1885,6 +1885,10 @@ public static class Merchant { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Settings specific to Konbini payments on the account. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + /** * The merchant category code for the merchant. MCCs are used to classify businesses based on * the goods or services they provide. @@ -1892,6 +1896,10 @@ public static class Merchant { @SerializedName("mcc") Object mcc; + /** Settings for the default text that appears on statements for language variations. */ + @SerializedName("script_statement_descriptor") + ScriptStatementDescriptor scriptStatementDescriptor; + /** Statement descriptor. */ @SerializedName("statement_descriptor") StatementDescriptor statementDescriptor; @@ -1907,7 +1915,9 @@ private Merchant( Capabilities capabilities, CardPayments cardPayments, Map extraParams, + KonbiniPayments konbiniPayments, Object mcc, + ScriptStatementDescriptor scriptStatementDescriptor, StatementDescriptor statementDescriptor, Support support) { this.applied = applied; @@ -1916,7 +1926,9 @@ private Merchant( this.capabilities = capabilities; this.cardPayments = cardPayments; this.extraParams = extraParams; + this.konbiniPayments = konbiniPayments; this.mcc = mcc; + this.scriptStatementDescriptor = scriptStatementDescriptor; this.statementDescriptor = statementDescriptor; this.support = support; } @@ -1938,8 +1950,12 @@ public static class Builder { private Map extraParams; + private KonbiniPayments konbiniPayments; + private Object mcc; + private ScriptStatementDescriptor scriptStatementDescriptor; + private StatementDescriptor statementDescriptor; private Support support; @@ -1953,7 +1969,9 @@ public AccountUpdateParams.Configuration.Merchant build() { this.capabilities, this.cardPayments, this.extraParams, + this.konbiniPayments, this.mcc, + this.scriptStatementDescriptor, this.statementDescriptor, this.support); } @@ -2025,6 +2043,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Settings specific to Konbini payments on the account. */ + public Builder setKonbiniPayments( + AccountUpdateParams.Configuration.Merchant.KonbiniPayments konbiniPayments) { + this.konbiniPayments = konbiniPayments; + return this; + } + /** * The merchant category code for the merchant. MCCs are used to classify businesses based * on the goods or services they provide. @@ -2043,6 +2068,14 @@ public Builder setMcc(EmptyParam mcc) { return this; } + /** Settings for the default text that appears on statements for language variations. */ + public Builder setScriptStatementDescriptor( + AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor + scriptStatementDescriptor) { + this.scriptStatementDescriptor = scriptStatementDescriptor; + return this; + } + /** Statement descriptor. */ public Builder setStatementDescriptor( AccountUpdateParams.Configuration.Merchant.StatementDescriptor statementDescriptor) { @@ -6866,19 +6899,7 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class StatementDescriptor { - /** - * The default text that appears on statements for non-card charges outside of Japan. For - * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as - * the statement descriptor prefix. In that case, if concatenating the statement descriptor - * suffix causes the combined statement descriptor to exceed 22 characters, we truncate the - * statement_descriptor text to limit the full descriptor to 22 characters. For more - * information about statement descriptors and their requirements, see the Merchant - * Configuration settings documentation. - */ - @SerializedName("descriptor") - Object descriptor; - + public static class KonbiniPayments { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -6889,22 +6910,13 @@ public static class StatementDescriptor { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Default text that appears on statements for card charges outside of Japan, prefixing any - * dynamic statement_descriptor_suffix specified on the charge. To maximize space for the - * dynamic part of the descriptor, keep this text short. If you don’t specify this value, - * statement_descriptor is used as the prefix. For more information about statement - * descriptors and their requirements, see the Merchant Configuration settings - * documentation. - */ - @SerializedName("prefix") - Object prefix; + /** Support for Konbini payments. */ + @SerializedName("support") + Support support; - private StatementDescriptor( - Object descriptor, Map extraParams, Object prefix) { - this.descriptor = descriptor; + private KonbiniPayments(Map extraParams, Support support) { this.extraParams = extraParams; - this.prefix = prefix; + this.support = support; } public static Builder builder() { @@ -6912,52 +6924,21 @@ public static Builder builder() { } public static class Builder { - private Object descriptor; - private Map extraParams; - private Object prefix; + private Support support; /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Configuration.Merchant.StatementDescriptor build() { - return new AccountUpdateParams.Configuration.Merchant.StatementDescriptor( - this.descriptor, this.extraParams, this.prefix); - } - - /** - * The default text that appears on statements for non-card charges outside of Japan. For - * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as - * the statement descriptor prefix. In that case, if concatenating the statement - * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we - * truncate the statement_descriptor text to limit the full descriptor to 22 characters. - * For more information about statement descriptors and their requirements, see the - * Merchant Configuration settings documentation. - */ - public Builder setDescriptor(String descriptor) { - this.descriptor = descriptor; - return this; - } - - /** - * The default text that appears on statements for non-card charges outside of Japan. For - * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as - * the statement descriptor prefix. In that case, if concatenating the statement - * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we - * truncate the statement_descriptor text to limit the full descriptor to 22 characters. - * For more information about statement descriptors and their requirements, see the - * Merchant Configuration settings documentation. - */ - public Builder setDescriptor(EmptyParam descriptor) { - this.descriptor = descriptor; - return this; + public AccountUpdateParams.Configuration.Merchant.KonbiniPayments build() { + return new AccountUpdateParams.Configuration.Merchant.KonbiniPayments( + this.extraParams, this.support); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountUpdateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the - * field documentation. + * map. See {@link AccountUpdateParams.Configuration.Merchant.KonbiniPayments#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6970,9 +6951,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountUpdateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the - * field documentation. + * map. See {@link AccountUpdateParams.Configuration.Merchant.KonbiniPayments#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6982,135 +6962,880 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Default text that appears on statements for card charges outside of Japan, prefixing - * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for - * the dynamic part of the descriptor, keep this text short. If you don’t specify this - * value, statement_descriptor is used as the prefix. For more information about statement - * descriptors and their requirements, see the Merchant Configuration settings - * documentation. - */ - public Builder setPrefix(String prefix) { - this.prefix = prefix; + /** Support for Konbini payments. */ + public Builder setSupport( + AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support support) { + this.support = support; return this; } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Support { + /** Support email address for Konbini payments. */ + @SerializedName("email") + Object email; /** - * Default text that appears on statements for card charges outside of Japan, prefixing - * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for - * the dynamic part of the descriptor, keep this text short. If you don’t specify this - * value, statement_descriptor is used as the prefix. For more information about statement - * descriptors and their requirements, see the Merchant Configuration settings - * documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. */ - public Builder setPrefix(EmptyParam prefix) { - this.prefix = prefix; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Support hours for Konbini payments. */ + @SerializedName("hours") + Hours hours; + + /** Support phone number for Konbini payments. */ + @SerializedName("phone") + Object phone; + + private Support( + Object email, Map extraParams, Hours hours, Object phone) { + this.email = email; + this.extraParams = extraParams; + this.hours = hours; + this.phone = phone; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Support { - /** A publicly available mailing address for sending support issues to. */ - @SerializedName("address") - Address address; + public static Builder builder() { + return new Builder(); + } - /** A publicly available email address for sending support issues to. */ - @SerializedName("email") - Object email; + public static class Builder { + private 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; + private Map extraParams; - /** A publicly available phone number to call with support issues. */ - @SerializedName("phone") - Object phone; + private Hours hours; - /** A publicly available website for handling support issues. */ - @SerializedName("url") - Object url; + private Object phone; - private Support( - Address address, - Object email, - Map extraParams, - Object phone, - Object url) { - this.address = address; - this.email = email; - this.extraParams = extraParams; - this.phone = phone; - this.url = url; - } + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support build() { + return new AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support( + this.email, this.extraParams, this.hours, this.phone); + } - public static Builder builder() { - return new Builder(); - } + /** Support email address for Konbini payments. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } - public static class Builder { - private Address address; + /** Support email address for Konbini payments. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } - private Object email; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Map extraParams; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private Object phone; + /** Support hours for Konbini payments. */ + public Builder setHours( + AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours hours) { + this.hours = hours; + return this; + } - private Object url; + /** Support phone number for Konbini payments. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Configuration.Merchant.Support build() { - return new AccountUpdateParams.Configuration.Merchant.Support( - this.address, this.email, this.extraParams, this.phone, this.url); + /** Support phone number for Konbini payments. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } } - /** A publicly available mailing address for sending support issues to. */ - public Builder setAddress( - AccountUpdateParams.Configuration.Merchant.Support.Address address) { - this.address = address; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hours { + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("end_time") + Object endTime; - /** A publicly available email address for sending support issues to. */ - public Builder setEmail(String email) { - this.email = email; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** A publicly available email address for sending support issues to. */ - public Builder setEmail(EmptyParam email) { - this.email = email; - return this; - } + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("start_time") + Object startTime; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link AccountUpdateParams.Configuration.Merchant.Support#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Hours(Object endTime, Map extraParams, Object startTime) { + this.endTime = endTime; + this.extraParams = extraParams; + this.startTime = startTime; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link AccountUpdateParams.Configuration.Merchant.Support#extraParams} for the - * field documentation. + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object endTime; + + private Map extraParams; + + private Object startTime; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours + build() { + return new AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours( + this.endTime, this.extraParams, this.startTime); + } + + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + public Builder setEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + public Builder setEndTime(EmptyParam endTime) { + this.endTime = endTime; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + public Builder setStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + public Builder setStartTime(EmptyParam startTime) { + this.startTime = startTime; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptStatementDescriptor { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Kana variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kana") + Kana kana; + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptStatementDescriptor(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor build() { + return new AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor#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 Kana variation of statement_descriptor used for charges in Japan. Japanese + * statement descriptors have special + * requirements. + */ + public Builder setKana( + AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana kana) { + this.kana = kana; + return this; + } + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese + * statement descriptors have special + * requirements. + */ + public Builder setKanji( + AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + Object descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + Object prefix; + + private Kana(Object descriptor, Map extraParams, Object prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object descriptor; + + private Map extraParams; + + private Object prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana + build() { + return new AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(EmptyParam descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(EmptyParam prefix) { + this.prefix = prefix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + Object descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + Object prefix; + + private Kanji(Object descriptor, Map extraParams, Object prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object descriptor; + + private Map extraParams; + + private Object prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji + build() { + return new AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(EmptyParam descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(EmptyParam prefix) { + this.prefix = prefix; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StatementDescriptor { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement descriptor + * suffix causes the combined statement descriptor to exceed 22 characters, we truncate the + * statement_descriptor text to limit the full descriptor to 22 characters. For more + * information about statement descriptors and their requirements, see the Merchant + * Configuration settings documentation. + */ + @SerializedName("descriptor") + Object descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing any + * dynamic statement_descriptor_suffix specified on the charge. To maximize space for the + * dynamic part of the descriptor, keep this text short. If you don’t specify this value, + * statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + Object prefix; + + private StatementDescriptor( + Object descriptor, Map extraParams, Object prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object descriptor; + + private Map extraParams; + + private Object prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.StatementDescriptor build() { + return new AccountUpdateParams.Configuration.Merchant.StatementDescriptor( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + public Builder setDescriptor(EmptyParam descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(EmptyParam prefix) { + this.prefix = prefix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Support { + /** A publicly available mailing address for sending support issues to. */ + @SerializedName("address") + Address address; + + /** A publicly available email address for sending support issues to. */ + @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; + + /** A publicly available phone number to call with support issues. */ + @SerializedName("phone") + Object phone; + + /** A publicly available website for handling support issues. */ + @SerializedName("url") + Object url; + + private Support( + Address address, + Object email, + Map extraParams, + Object phone, + Object url) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.phone = phone; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Object email; + + private Map extraParams; + + private Object phone; + + private Object url; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Support build() { + return new AccountUpdateParams.Configuration.Merchant.Support( + this.address, this.email, this.extraParams, this.phone, this.url); + } + + /** A publicly available mailing address for sending support issues to. */ + public Builder setAddress( + AccountUpdateParams.Configuration.Merchant.Support.Address address) { + this.address = address; + return this; + } + + /** A publicly available email address for sending support issues to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** A publicly available email address for sending support issues to. */ + 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 AccountUpdateParams.Configuration.Merchant.Support#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.Support#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -8526,6 +9251,10 @@ public Builder setRequested(Boolean requested) { @Getter @EqualsAndHashCode(callSuper = false) public static class HoldsCurrencies { + /** Can hold storage-type funds on Stripe in EUR. */ + @SerializedName("eur") + Eur eur; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -8544,7 +9273,8 @@ public static class HoldsCurrencies { @SerializedName("usd") Usd usd; - private HoldsCurrencies(Map extraParams, Gbp gbp, Usd usd) { + private HoldsCurrencies(Eur eur, Map extraParams, Gbp gbp, Usd usd) { + this.eur = eur; this.extraParams = extraParams; this.gbp = gbp; this.usd = usd; @@ -8555,6 +9285,8 @@ public static Builder builder() { } public static class Builder { + private Eur eur; + private Map extraParams; private Gbp gbp; @@ -8564,7 +9296,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies build() { return new AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies( - this.extraParams, this.gbp, this.usd); + this.eur, this.extraParams, this.gbp, this.usd); + } + + /** Can hold storage-type funds on Stripe in EUR. */ + public Builder setEur( + AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Eur eur) { + this.eur = eur; + return this; } /** @@ -8612,6 +9351,88 @@ public Builder setUsd( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Eur { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Eur(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Eur + build() { + return new AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies + .Eur(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Eur#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Eur#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Gbp { diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 982f06c6b3e..8feed7d3af9 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3208,7 +3208,7 @@ public void testCoreEventsGetServices() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\",\"livemode\":true}"); + "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("ll_123"); @@ -25473,7 +25473,7 @@ public void testV2CoreEventGetServices() throws StripeException { null, new TypeToken< com.stripe.model.v2.StripeCollection>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"type\":\"type\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventListParams params = @@ -25495,7 +25495,7 @@ public void testV2CoreEventGet2Services() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"type\":\"type\",\"livemode\":true}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("id_123"); @@ -25694,7 +25694,7 @@ public void testV2CoreEventDestinationPost5Services() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"type\":\"type\",\"livemode\":true}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().eventDestinations().ping("id_123"); From f2a8e856a217e81ef97efd3be176252435580698 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 21:57:01 +0000 Subject: [PATCH 03/17] Update generated code for v2111 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Account.java | 5 +- src/main/java/com/stripe/model/Invoice.java | 3 +- src/main/java/com/stripe/model/Mandate.java | 6 +- .../java/com/stripe/model/PaymentIntent.java | 14 +++- .../com/stripe/model/QuotePreviewInvoice.java | 3 +- .../java/com/stripe/model/SetupIntent.java | 6 +- .../com/stripe/model/checkout/Session.java | 6 +- .../com/stripe/param/AccountCreateParams.java | 10 +-- .../com/stripe/param/AccountUpdateParams.java | 10 +-- .../param/CustomerSessionCreateParams.java | 4 +- .../param/PaymentIntentConfirmParams.java | 67 +++++++++++++++++-- .../param/PaymentIntentCreateParams.java | 67 +++++++++++++++++-- .../param/PaymentIntentUpdateParams.java | 67 +++++++++++++++++-- .../param/SetupIntentConfirmParams.java | 17 +++-- .../stripe/param/SetupIntentCreateParams.java | 17 +++-- .../stripe/param/SetupIntentUpdateParams.java | 17 +++-- .../param/checkout/SessionCreateParams.java | 17 +++-- .../terminal/ConfigurationCreateParams.java | 28 ++++---- .../terminal/ConfigurationUpdateParams.java | 30 ++++----- 21 files changed, 310 insertions(+), 88 deletions(-) diff --git a/API_VERSION b/API_VERSION index 573f1065e76..94daf4d3dad 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -a9b4d5059aeb24192ebc26c24160bb6e495bd6cb \ No newline at end of file +9ac5029808e80ae9b96278ea0497ef34d3e529cb \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 922ac626dbb..dfd2783f161 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2109 \ No newline at end of file +v2111 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index eb11d409b51..1e45c80852f 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -2871,8 +2871,9 @@ public static class Invoices extends StripeObject { List> defaultAccountTaxIds; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. * *

One of {@code always}, {@code never}, or {@code offer}. */ diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 70efca9c777..2e3507762e8 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -181,7 +181,8 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreOne of {@code automatic_pending_invoice_item_invoice}, {@code manual}, {@code quote_accept}, * {@code subscription}, {@code subscription_create}, {@code subscription_cycle}, {@code diff --git a/src/main/java/com/stripe/model/Mandate.java b/src/main/java/com/stripe/model/Mandate.java index 2f307f77d2a..d6a32b294a5 100644 --- a/src/main/java/com/stripe/model/Mandate.java +++ b/src/main/java/com/stripe/model/Mandate.java @@ -529,6 +529,7 @@ public static class Payto extends StripeObject { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. * *

One of {@code fixed}, or {@code maximum}. */ @@ -543,7 +544,7 @@ public static class Payto extends StripeObject { String endDate; /** - * The periodicity at which payments will be collected. + * The periodicity at which payments will be collected. Defaults to {@code adhoc}. * *

One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}. @@ -559,7 +560,8 @@ public static class Payto extends StripeObject { Long paymentsPerPeriod; /** - * The purpose for which payments are made. Defaults to retail. + * The purpose for which payments are made. Has a default value based on your merchant + * category code. * *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage}, * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index f71e2fca1b4..5a68515a626 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -4286,6 +4286,14 @@ public static class Address extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class CardPresent extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

One of {@code manual}, or {@code manual_preferred}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Request ability to capture this payment beyond the standard authorization @@ -5515,6 +5523,7 @@ public static class MandateOptions extends StripeObject { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. * *

One of {@code fixed}, or {@code maximum}. */ @@ -5529,7 +5538,7 @@ public static class MandateOptions extends StripeObject { String endDate; /** - * The periodicity at which payments will be collected. + * The periodicity at which payments will be collected. Defaults to {@code adhoc}. * *

One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}. @@ -5546,7 +5555,8 @@ public static class MandateOptions extends StripeObject { Long paymentsPerPeriod; /** - * The purpose for which payments are made. Defaults to retail. + * The purpose for which payments are made. Has a default value based on your merchant + * category code. * *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage}, * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index 1f0058d6137..43a165079da 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -161,7 +161,8 @@ public class QuotePreviewInvoice extends ApiResource implements HasId { * A new subscription was created. * {@code subscription_cycle}: A subscription advanced into a * new period. * {@code subscription_threshold}: A subscription reached a billing threshold. * * {@code subscription_update}: A subscription was updated. * {@code upcoming}: Reserved for - * simulated invoices, per the upcoming invoice endpoint. + * upcoming invoices created through the Create Preview Invoice API or when an {@code + * invoice.upcoming} event is generated for an upcoming invoice on a subscription. * *

One of {@code automatic_pending_invoice_item_invoice}, {@code manual}, {@code quote_accept}, * {@code subscription}, {@code subscription_create}, {@code subscription_cycle}, {@code diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 81e94bf8ba6..3cf06bee3e5 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -1411,6 +1411,7 @@ public static class MandateOptions extends StripeObject { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. * *

One of {@code fixed}, or {@code maximum}. */ @@ -1425,7 +1426,7 @@ public static class MandateOptions extends StripeObject { String endDate; /** - * The periodicity at which payments will be collected. + * The periodicity at which payments will be collected. Defaults to {@code adhoc}. * *

One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}. @@ -1442,7 +1443,8 @@ public static class MandateOptions extends StripeObject { Long paymentsPerPeriod; /** - * The purpose for which payments are made. Defaults to retail. + * The purpose for which payments are made. Has a default value based on your merchant + * category code. * *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage}, * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index ab224ada7d0..d37d901ef88 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -3633,6 +3633,7 @@ public static class MandateOptions extends StripeObject { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. * *

One of {@code fixed}, or {@code maximum}. */ @@ -3647,7 +3648,7 @@ public static class MandateOptions extends StripeObject { String endDate; /** - * The periodicity at which payments will be collected. + * The periodicity at which payments will be collected. Defaults to {@code adhoc}. * *

One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}. @@ -3664,7 +3665,8 @@ public static class MandateOptions extends StripeObject { Long paymentsPerPeriod; /** - * The purpose for which payments are made. Defaults to retail. + * The purpose for which payments are made. Has a default value based on your merchant + * category code. * *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage}, * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 1022f5aa67e..d265680014d 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -15206,8 +15206,9 @@ public static class Invoices { Map extraParams; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. */ @SerializedName("hosted_payment_method_save") HostedPaymentMethodSave hostedPaymentMethodSave; @@ -15262,8 +15263,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether payment methods should be saved when a payment is completed for a one-time - * invoices on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or + * a subscription invoice when the customer already has a default payment method on the + * hosted invoice page. */ public Builder setHostedPaymentMethodSave( AccountCreateParams.Settings.Invoices.HostedPaymentMethodSave hostedPaymentMethodSave) { diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index b8f79658e1e..b2e7726a895 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -15292,8 +15292,9 @@ public static class Invoices { Map extraParams; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. */ @SerializedName("hosted_payment_method_save") HostedPaymentMethodSave hostedPaymentMethodSave; @@ -15403,8 +15404,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether payment methods should be saved when a payment is completed for a one-time - * invoices on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or + * a subscription invoice when the customer already has a default payment method on the + * hosted invoice page. */ public Builder setHostedPaymentMethodSave( AccountUpdateParams.Settings.Invoices.HostedPaymentMethodSave hostedPaymentMethodSave) { diff --git a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java index a7738272279..45ade58fe6c 100644 --- a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java @@ -14,7 +14,7 @@ @EqualsAndHashCode(callSuper = false) public class CustomerSessionCreateParams extends ApiRequestParams { /** - * Required. Configuration for each component. Exactly 1 component must be + * Required. Configuration for each component. At least 1 component must be * enabled. */ @SerializedName("components") @@ -76,7 +76,7 @@ public CustomerSessionCreateParams build() { } /** - * Required. Configuration for each component. Exactly 1 component must be + * Required. Configuration for each component. At least 1 component must be * enabled. */ public Builder setComponents(CustomerSessionCreateParams.Components components) { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index b2f0aa3cbea..63d7ba7b21d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -20172,6 +20172,19 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -20208,10 +20221,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -20223,6 +20238,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -20234,12 +20251,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -20394,6 +20429,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter @@ -26663,6 +26713,7 @@ public static class MandateOptions { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. */ @SerializedName("amount_type") AmountType amountType; @@ -26684,7 +26735,7 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ @SerializedName("payment_schedule") PaymentSchedule paymentSchedule; @@ -26696,7 +26747,10 @@ public static class MandateOptions { @SerializedName("payments_per_period") Long paymentsPerPeriod; - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ @SerializedName("purpose") Purpose purpose; @@ -26760,7 +26814,7 @@ public Builder setAmount(Long amount) { /** * The type of amount that will be collected. The amount charged must be exact or up to * the value of {@code amount} param for {@code fixed} or {@code maximum} type - * respectively. + * respectively. Defaults to {@code maximum}. */ public Builder setAmountType( PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.AmountType @@ -26808,7 +26862,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ public Builder setPaymentSchedule( PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule paymentSchedule) { @@ -26826,7 +26880,10 @@ public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { return this; } - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ public Builder setPurpose( PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index c471496785a..28da62c1da8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -20656,6 +20656,19 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -20692,10 +20705,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -20707,6 +20722,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -20718,12 +20735,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -20878,6 +20913,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter @@ -27139,6 +27189,7 @@ public static class MandateOptions { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. */ @SerializedName("amount_type") AmountType amountType; @@ -27160,7 +27211,7 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ @SerializedName("payment_schedule") PaymentSchedule paymentSchedule; @@ -27172,7 +27223,10 @@ public static class MandateOptions { @SerializedName("payments_per_period") Long paymentsPerPeriod; - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ @SerializedName("purpose") Purpose purpose; @@ -27236,7 +27290,7 @@ public Builder setAmount(Long amount) { /** * The type of amount that will be collected. The amount charged must be exact or up to * the value of {@code amount} param for {@code fixed} or {@code maximum} type - * respectively. + * respectively. Defaults to {@code maximum}. */ public Builder setAmountType( PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType @@ -27284,7 +27338,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ public Builder setPaymentSchedule( PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule paymentSchedule) { @@ -27302,7 +27356,10 @@ public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { return this; } - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ public Builder setPurpose( PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { this.purpose = purpose; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 5f7ead890b5..495d1d1bfcc 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -21247,6 +21247,19 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -21283,10 +21296,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -21298,6 +21313,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -21309,12 +21326,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -21469,6 +21504,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter @@ -27833,6 +27883,7 @@ public static class MandateOptions { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. */ @SerializedName("amount_type") AmountType amountType; @@ -27854,7 +27905,7 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ @SerializedName("payment_schedule") PaymentSchedule paymentSchedule; @@ -27866,7 +27917,10 @@ public static class MandateOptions { @SerializedName("payments_per_period") Long paymentsPerPeriod; - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ @SerializedName("purpose") Purpose purpose; @@ -27930,7 +27984,7 @@ public Builder setAmount(Long amount) { /** * The type of amount that will be collected. The amount charged must be exact or up to * the value of {@code amount} param for {@code fixed} or {@code maximum} type - * respectively. + * respectively. Defaults to {@code maximum}. */ public Builder setAmountType( PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType @@ -27987,7 +28041,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ public Builder setPaymentSchedule( PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule paymentSchedule) { @@ -28005,7 +28059,10 @@ public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { return this; } - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ public Builder setPurpose( PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { this.purpose = purpose; diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index fb7e37c33ca..9ea6e2773ee 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -10269,6 +10269,7 @@ public static class MandateOptions { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. */ @SerializedName("amount_type") AmountType amountType; @@ -10290,7 +10291,7 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ @SerializedName("payment_schedule") PaymentSchedule paymentSchedule; @@ -10302,7 +10303,10 @@ public static class MandateOptions { @SerializedName("payments_per_period") Long paymentsPerPeriod; - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ @SerializedName("purpose") Purpose purpose; @@ -10378,7 +10382,7 @@ public Builder setAmount(Long amount) { /** * The type of amount that will be collected. The amount charged must be exact or up to * the value of {@code amount} param for {@code fixed} or {@code maximum} type - * respectively. + * respectively. Defaults to {@code maximum}. */ public Builder setAmountType( SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.AmountType @@ -10426,7 +10430,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ public Builder setPaymentSchedule( SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule paymentSchedule) { @@ -10444,7 +10448,10 @@ public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { return this; } - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ public Builder setPurpose( SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { this.purpose = purpose; diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index aabcc00847f..d8183e67cbf 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -10801,6 +10801,7 @@ public static class MandateOptions { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. */ @SerializedName("amount_type") AmountType amountType; @@ -10822,7 +10823,7 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ @SerializedName("payment_schedule") PaymentSchedule paymentSchedule; @@ -10834,7 +10835,10 @@ public static class MandateOptions { @SerializedName("payments_per_period") Long paymentsPerPeriod; - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ @SerializedName("purpose") Purpose purpose; @@ -10910,7 +10914,7 @@ public Builder setAmount(Long amount) { /** * The type of amount that will be collected. The amount charged must be exact or up to * the value of {@code amount} param for {@code fixed} or {@code maximum} type - * respectively. + * respectively. Defaults to {@code maximum}. */ public Builder setAmountType( SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType @@ -10958,7 +10962,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ public Builder setPaymentSchedule( SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule paymentSchedule) { @@ -10976,7 +10980,10 @@ public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { return this; } - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ public Builder setPurpose( SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { this.purpose = purpose; diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index ae67567c368..3683869bfc3 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -10490,6 +10490,7 @@ public static class MandateOptions { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. */ @SerializedName("amount_type") AmountType amountType; @@ -10511,7 +10512,7 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ @SerializedName("payment_schedule") PaymentSchedule paymentSchedule; @@ -10523,7 +10524,10 @@ public static class MandateOptions { @SerializedName("payments_per_period") Long paymentsPerPeriod; - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ @SerializedName("purpose") Purpose purpose; @@ -10599,7 +10603,7 @@ public Builder setAmount(Long amount) { /** * The type of amount that will be collected. The amount charged must be exact or up to * the value of {@code amount} param for {@code fixed} or {@code maximum} type - * respectively. + * respectively. Defaults to {@code maximum}. */ public Builder setAmountType( SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType @@ -10656,7 +10660,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ public Builder setPaymentSchedule( SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule paymentSchedule) { @@ -10674,7 +10678,10 @@ public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { return this; } - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ public Builder setPurpose( SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { this.purpose = purpose; diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 7cc7e4dc507..75bfec2ac2c 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -14731,6 +14731,7 @@ public static class MandateOptions { /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. */ @SerializedName("amount_type") AmountType amountType; @@ -14752,7 +14753,7 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ @SerializedName("payment_schedule") PaymentSchedule paymentSchedule; @@ -14764,7 +14765,10 @@ public static class MandateOptions { @SerializedName("payments_per_period") Long paymentsPerPeriod; - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ @SerializedName("purpose") Purpose purpose; @@ -14840,7 +14844,7 @@ public Builder setAmount(Long amount) { /** * The type of amount that will be collected. The amount charged must be exact or up to * the value of {@code amount} param for {@code fixed} or {@code maximum} type - * respectively. + * respectively. Defaults to {@code maximum}. */ public Builder setAmountType( SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType amountType) { @@ -14887,7 +14891,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The periodicity at which payments will be collected. */ + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ public Builder setPaymentSchedule( SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule paymentSchedule) { @@ -14905,7 +14909,10 @@ public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { return this; } - /** The purpose for which payments are made. Defaults to retail. */ + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ public Builder setPurpose( SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { this.purpose = purpose; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index a641a4b7a13..0b790b5f102 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -47,7 +47,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("reader_security") Object readerSecurity; - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ @SerializedName("reboot_window") RebootWindow rebootWindow; @@ -55,7 +55,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("stripe_s700") StripeS700 stripeS700; - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ @SerializedName("tipping") Object tipping; @@ -234,7 +234,7 @@ public Builder setReaderSecurity(EmptyParam readerSecurity) { return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(ConfigurationCreateParams.RebootWindow rebootWindow) { this.rebootWindow = rebootWindow; return this; @@ -246,13 +246,13 @@ public Builder setStripeS700(ConfigurationCreateParams.StripeS700 stripeS700) { return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(ConfigurationCreateParams.Tipping tipping) { this.tipping = tipping; return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(EmptyParam tipping) { this.tipping = tipping; return this; @@ -289,7 +289,7 @@ public static class BbposWisepad3 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -339,13 +339,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -688,7 +688,7 @@ public static class StripeS700 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -737,13 +737,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -4407,7 +4407,7 @@ public static class VerifoneP400 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -4456,13 +4456,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index f0c9de33cba..3399efa11bc 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -47,7 +47,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("reader_security") Object readerSecurity; - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ @SerializedName("reboot_window") Object rebootWindow; @@ -55,7 +55,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("stripe_s700") Object stripeS700; - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ @SerializedName("tipping") Object tipping; @@ -252,13 +252,13 @@ public Builder setReaderSecurity(EmptyParam readerSecurity) { return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(ConfigurationUpdateParams.RebootWindow rebootWindow) { this.rebootWindow = rebootWindow; return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(EmptyParam rebootWindow) { this.rebootWindow = rebootWindow; return this; @@ -276,13 +276,13 @@ public Builder setStripeS700(EmptyParam stripeS700) { return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(ConfigurationUpdateParams.Tipping tipping) { this.tipping = tipping; return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(EmptyParam tipping) { this.tipping = tipping; return this; @@ -325,7 +325,7 @@ public static class BbposWisepad3 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -375,13 +375,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -724,7 +724,7 @@ public static class StripeS700 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -773,13 +773,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -4443,7 +4443,7 @@ public static class VerifoneP400 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -4492,13 +4492,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; From da6145b8e313ccfaae0195daba83c9469f0baba2 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:50:09 -0800 Subject: [PATCH 04/17] Update generated code (#2102) * Update generated code for v2108 and * Update generated code for v2109 and * Update generated code for v2111 and * Update generated code for v2111 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Account.java | 5 +- src/main/java/com/stripe/model/Invoice.java | 3 +- .../java/com/stripe/model/InvoicePayment.java | 2 +- .../java/com/stripe/model/PaymentIntent.java | 8 +++ .../stripe/model/v2/billing/MeterEvent.java | 3 +- .../com/stripe/param/AccountCreateParams.java | 10 ++-- .../com/stripe/param/AccountUpdateParams.java | 10 ++-- .../param/CustomerSessionCreateParams.java | 4 +- .../param/PaymentIntentConfirmParams.java | 50 +++++++++++++++++++ .../param/PaymentIntentCreateParams.java | 50 +++++++++++++++++++ .../param/PaymentIntentUpdateParams.java | 50 +++++++++++++++++++ .../terminal/ConfigurationCreateParams.java | 28 +++++------ .../terminal/ConfigurationUpdateParams.java | 30 +++++------ .../stripe/functional/GeneratedExamples.java | 8 +-- 16 files changed, 215 insertions(+), 50 deletions(-) diff --git a/API_VERSION b/API_VERSION index 1105d43533a..dffa3a76a26 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -3ccf295957c8cadc88e1463ea3ab4ec683a0314f \ No newline at end of file +6d15a7f20cb77c2c22091a30e499cb89d7e3248c \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c8ed627ff9c..dfd2783f161 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2102 \ No newline at end of file +v2111 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 6bb0b6aa335..af2d74311c5 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -2600,8 +2600,9 @@ public static class Invoices extends StripeObject { List> defaultAccountTaxIds; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. * *

One of {@code always}, {@code never}, or {@code offer}. */ diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 1e44d0a03d4..4ab0327967b 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -174,7 +174,8 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreOne of {@code automatic_pending_invoice_item_invoice}, {@code manual}, {@code quote_accept}, * {@code subscription}, {@code subscription_create}, {@code subscription_cycle}, {@code diff --git a/src/main/java/com/stripe/model/InvoicePayment.java b/src/main/java/com/stripe/model/InvoicePayment.java index 300ebea267f..46165f99bc2 100644 --- a/src/main/java/com/stripe/model/InvoicePayment.java +++ b/src/main/java/com/stripe/model/InvoicePayment.java @@ -244,7 +244,7 @@ public static class Payment extends StripeObject { /** * Type of payment object associated with this invoice payment. * - *

One of {@code charge}, or {@code payment_intent}. + *

One of {@code charge}, {@code payment_intent}, or {@code payment_record}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 7940d8b6936..f252c6baa92 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -3591,6 +3591,14 @@ public static class MandateOptions extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class CardPresent extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

One of {@code manual}, or {@code manual_preferred}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Request ability to capture this payment beyond the standard authorization diff --git a/src/main/java/com/stripe/model/v2/billing/MeterEvent.java b/src/main/java/com/stripe/model/v2/billing/MeterEvent.java index 698c1693576..ac2b0fa94ad 100644 --- a/src/main/java/com/stripe/model/v2/billing/MeterEvent.java +++ b/src/main/java/com/stripe/model/v2/billing/MeterEvent.java @@ -48,7 +48,8 @@ public class MeterEvent extends StripeObject { /** * The payload of the event. This must contain the fields corresponding to a meter’s {@code * customer_mapping.event_payload_key} (default is {@code stripe_customer_id}) and {@code - * value_settings.event_payload_key} (default is {@code value}). Read more about the payload. + * value_settings.event_payload_key} (default is {@code value}). Read more about the payload.. */ @SerializedName("payload") Map payload; diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index c3016cdefe9..73fde2ee8c1 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -13078,8 +13078,9 @@ public static class Invoices { Map extraParams; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. */ @SerializedName("hosted_payment_method_save") HostedPaymentMethodSave hostedPaymentMethodSave; @@ -13134,8 +13135,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether payment methods should be saved when a payment is completed for a one-time - * invoices on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or + * a subscription invoice when the customer already has a default payment method on the + * hosted invoice page. */ public Builder setHostedPaymentMethodSave( AccountCreateParams.Settings.Invoices.HostedPaymentMethodSave hostedPaymentMethodSave) { diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index a9e3228a67c..84a6588217b 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -13389,8 +13389,9 @@ public static class Invoices { Map extraParams; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. */ @SerializedName("hosted_payment_method_save") HostedPaymentMethodSave hostedPaymentMethodSave; @@ -13500,8 +13501,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether payment methods should be saved when a payment is completed for a one-time - * invoices on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or + * a subscription invoice when the customer already has a default payment method on the + * hosted invoice page. */ public Builder setHostedPaymentMethodSave( AccountUpdateParams.Settings.Invoices.HostedPaymentMethodSave hostedPaymentMethodSave) { diff --git a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java index ee7be3686a9..ed4ad7be7e0 100644 --- a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java @@ -14,7 +14,7 @@ @EqualsAndHashCode(callSuper = false) public class CustomerSessionCreateParams extends ApiRequestParams { /** - * Required. Configuration for each component. Exactly 1 component must be + * Required. Configuration for each component. At least 1 component must be * enabled. */ @SerializedName("components") @@ -71,7 +71,7 @@ public CustomerSessionCreateParams build() { } /** - * Required. Configuration for each component. Exactly 1 component must be + * Required. Configuration for each component. At least 1 component must be * enabled. */ public Builder setComponents(CustomerSessionCreateParams.Components components) { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 1df40e05fd6..be80c26d41b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -14109,6 +14109,19 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -14145,10 +14158,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -14160,6 +14175,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -14171,12 +14188,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -14331,6 +14366,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index c9e00b0fff2..f53ec480c20 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -14580,6 +14580,19 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -14616,10 +14629,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -14631,6 +14646,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -14642,12 +14659,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -14802,6 +14837,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index b111bb1fbb4..0dda380c7a8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -14338,6 +14338,19 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -14374,10 +14387,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -14389,6 +14404,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -14400,12 +14417,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -14560,6 +14595,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index 3f3eab84c58..e3a2a6341cc 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -43,7 +43,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("offline") Object offline; - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ @SerializedName("reboot_window") RebootWindow rebootWindow; @@ -51,7 +51,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("stripe_s700") StripeS700 stripeS700; - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ @SerializedName("tipping") Object tipping; @@ -213,7 +213,7 @@ public Builder setOffline(EmptyParam offline) { return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(ConfigurationCreateParams.RebootWindow rebootWindow) { this.rebootWindow = rebootWindow; return this; @@ -225,13 +225,13 @@ public Builder setStripeS700(ConfigurationCreateParams.StripeS700 stripeS700) { return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(ConfigurationCreateParams.Tipping tipping) { this.tipping = tipping; return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(EmptyParam tipping) { this.tipping = tipping; return this; @@ -268,7 +268,7 @@ public static class BbposWisepad3 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -318,13 +318,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -590,7 +590,7 @@ public static class StripeS700 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -639,13 +639,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -4309,7 +4309,7 @@ public static class VerifoneP400 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -4358,13 +4358,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 46b847bd319..382ad087f68 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -43,7 +43,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("offline") Object offline; - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ @SerializedName("reboot_window") Object rebootWindow; @@ -51,7 +51,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("stripe_s700") Object stripeS700; - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ @SerializedName("tipping") Object tipping; @@ -231,13 +231,13 @@ public Builder setOffline(EmptyParam offline) { return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(ConfigurationUpdateParams.RebootWindow rebootWindow) { this.rebootWindow = rebootWindow; return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(EmptyParam rebootWindow) { this.rebootWindow = rebootWindow; return this; @@ -255,13 +255,13 @@ public Builder setStripeS700(EmptyParam stripeS700) { return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(ConfigurationUpdateParams.Tipping tipping) { this.tipping = tipping; return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(EmptyParam tipping) { this.tipping = tipping; return this; @@ -304,7 +304,7 @@ public static class BbposWisepad3 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -354,13 +354,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -626,7 +626,7 @@ public static class StripeS700 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -675,13 +675,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -4345,7 +4345,7 @@ public static class VerifoneP400 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -4394,13 +4394,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index c0a666945d2..6eeab497786 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3208,7 +3208,7 @@ public void testCoreEventsGetServices() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\",\"livemode\":true}"); + "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("ll_123"); @@ -24499,7 +24499,7 @@ public void testV2CoreEventGetServices() throws StripeException { null, new TypeToken< com.stripe.model.v2.StripeCollection>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"type\":\"type\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventListParams params = @@ -24521,7 +24521,7 @@ public void testV2CoreEventGet2Services() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"type\":\"type\",\"livemode\":true}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("id_123"); @@ -24720,7 +24720,7 @@ public void testV2CoreEventDestinationPost5Services() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"type\":\"type\",\"livemode\":true}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().eventDestinations().ping("id_123"); From 6cf9067d10824556c1458c9ed85222c795388959 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Wed, 5 Nov 2025 14:57:30 -0800 Subject: [PATCH 05/17] Bump version to 30.2.0 --- CHANGELOG.md | 4 ++++ README.md | 10 +++++----- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 518c9e1fd51..bb385939066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 30.2.0 - 2025-11-05 +* [#2102](https://github.com/stripe/stripe-java/pull/2102) Update generated code + * Add support for `captureMethod` on `PaymentIntent.payment_method_options.card_present`, `PaymentIntentConfirmParams.payment_method_options.card_present`, `PaymentIntentCreateParams.payment_method_options.card_present`, and `PaymentIntentUpdateParams.payment_method_options.card_present` + ## 30.1.0 - 2025-10-29 This release changes the pinned API version to `2025-10-29.clover`. diff --git a/README.md b/README.md index 1b49ac3c351..8ba0ebf84f3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v30.1.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v30.2.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) @@ -23,7 +23,7 @@ We support LTS versions of the JDK. Currently, that's Java versions: Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:30.1.0" +implementation "com.stripe:stripe-java:30.2.0" ``` ### Maven users @@ -34,7 +34,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 30.1.0 + 30.2.0 ``` @@ -43,8 +43,8 @@ Add this dependency to your project's POM: If you are not using Gradle or Maven, you will need to manually install the following JARs: 1. The Stripe JAR: - - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/30.1.0/stripe-java-30.1.0.jar) - - Current release version: 30.1.0 + - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/30.2.0/stripe-java-30.2.0.jar) + - Current release version: 30.2.0 2. Google Gson: - The Stripe JAR builds and tests with Gson version 2.10.1 diff --git a/VERSION b/VERSION index a75ef34cbaa..0aaa30ef421 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -30.1.0 +30.2.0 diff --git a/gradle.properties b/gradle.properties index fc07f279b47..bca3db04d0b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=30.1.0 +VERSION_NAME=30.2.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index 87fee8e6e2b..9256fd3caf1 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -14,7 +14,7 @@ public abstract class Stripe { public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com"; - public static final String VERSION = "30.1.0"; + public static final String VERSION = "30.2.0"; public static volatile String apiKey; public static volatile String clientId; From b576d9634956e1c68a93c2613a8d7c52a9dac5c4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 17:41:09 +0000 Subject: [PATCH 06/17] Update generated code for v2113 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- ...tsOffSessionPaymentAttemptFailedEvent.java | 22 + ...PaymentAttemptFailedEventNotification.java | 28 + ...sOffSessionPaymentAttemptStartedEvent.java | 22 + ...aymentAttemptStartedEventNotification.java | 28 + .../stripe/model/v2/EventDataClassLookup.java | 6 + .../v2/EventNotificationClassLookup.java | 6 + .../com/stripe/model/v2/core/Account.java | 23 +- .../model/v2/payments/OffSessionPayment.java | 109 ---- .../OffSessionPaymentCaptureParams.java | 28 +- .../OffSessionPaymentCreateParams.java | 605 +----------------- .../stripe/functional/GeneratedExamples.java | 1 - 13 files changed, 135 insertions(+), 747 deletions(-) create mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java create mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEvent.java create mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.java diff --git a/API_VERSION b/API_VERSION index dffa3a76a26..8ab5aad442e 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -6d15a7f20cb77c2c22091a30e499cb89d7e3248c \ No newline at end of file +6e09523f05606953bb23892f6c4e3fe58fe5ce92 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 219e2f02a74..5c19124a9fa 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2112 \ No newline at end of file +v2113 \ No newline at end of file diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java new file mode 100644 index 00000000000..aa8d7203b89 --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentAttemptFailedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.java new file mode 100644 index 00000000000..8efcf8fda14 --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentAttemptFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2PaymentsOffSessionPaymentAttemptFailedEvent fetchEvent() throws StripeException { + return (V2PaymentsOffSessionPaymentAttemptFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEvent.java new file mode 100644 index 00000000000..9f52eb0c2d5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentAttemptStartedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.java new file mode 100644 index 00000000000..69a46100690 --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentAttemptStartedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2PaymentsOffSessionPaymentAttemptStartedEvent fetchEvent() throws StripeException { + return (V2PaymentsOffSessionPaymentAttemptStartedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 75fe5e952fd..4f44b081d4c 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -261,6 +261,12 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.money_management.transaction.updated", com.stripe.events.V2MoneyManagementTransactionUpdatedEvent.class); + eventClassLookup.put( + "v2.payments.off_session_payment.attempt_failed", + com.stripe.events.V2PaymentsOffSessionPaymentAttemptFailedEvent.class); + eventClassLookup.put( + "v2.payments.off_session_payment.attempt_started", + com.stripe.events.V2PaymentsOffSessionPaymentAttemptStartedEvent.class); eventClassLookup.put( "v2.payments.off_session_payment.authorization_attempt_failed", com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.class); diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index f8760c0b9b2..96073e31fd2 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -194,6 +194,12 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.money_management.transaction.updated", com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification.class); + eventClassLookup.put( + "v2.payments.off_session_payment.attempt_failed", + com.stripe.events.V2PaymentsOffSessionPaymentAttemptFailedEventNotification.class); + eventClassLookup.put( + "v2.payments.off_session_payment.attempt_started", + com.stripe.events.V2PaymentsOffSessionPaymentAttemptStartedEventNotification.class); eventClassLookup.put( "v2.payments.off_session_payment.authorization_attempt_failed", com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index 86b756238f3..1fa796bb0b5 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -4683,6 +4683,14 @@ public static class Responsibilities extends StripeObject { */ @SerializedName("losses_collector") String lossesCollector; + + /** + * A value indicating responsibility for collecting requirements on this account. + * + *

One of {@code application}, or {@code stripe}. + */ + @SerializedName("requirements_collector") + String requirementsCollector; } } @@ -6281,14 +6289,6 @@ public static class Kanji extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Requirements extends StripeObject { - /** - * A value indicating responsibility for collecting requirements on this account. - * - *

One of {@code application}, or {@code stripe}. - */ - @SerializedName("collector") - String collector; - /** A list of requirements for the Account. */ @SerializedName("entries") List entries; @@ -6538,10 +6538,11 @@ public static class Reference extends StripeObject { String resource; /** - * The type of the reference. An additional hash is included with a name matching the type. - * It contains additional information specific to the type. + * The type of the reference. If the type is "inquiry", the inquiry token can be + * found in the "inquiry" field. Otherwise the type is an API resource, the token + * for which can be found in the "resource" field. * - *

One of {@code inquiry}, or {@code resource}. + *

One of {@code inquiry}, {@code payment_method}, or {@code person}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java index 96b5161e84f..33421eaca2f 100644 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java @@ -6,7 +6,6 @@ import com.stripe.model.StripeObject; import com.stripe.v2.Amount; import java.time.Instant; -import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -21,10 +20,6 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("amount_capturable") Amount amountCapturable; - /** Provides industry-specific information about the amount. */ - @SerializedName("amount_details") - AmountDetails amountDetails; - /** The “presentment amount” to be collected from the customer. */ @SerializedName("amount_requested") Amount amountRequested; @@ -41,14 +36,6 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("capture") Capture capture; - /** - * Whether the OffSessionPayment should be captured automatically or manually. - * - *

One of {@code automatic}, or {@code manual}. - */ - @SerializedName("capture_method") - String captureMethod; - /** ID of the owning compartment. */ @SerializedName("compartment_id") String compartmentId; @@ -170,102 +157,6 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("transfer_data") TransferData transferData; - /** Provides industry-specific information about the amount. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class AmountDetails extends StripeObject { - /** The amount the total transaction was discounted for. */ - @SerializedName("discount_amount") - Long discountAmount; - - /** - * A list of line items, each containing information about a product in the PaymentIntent. There - * is a maximum of 100 line items. - */ - @SerializedName("line_items") - List lineItems; - - /** Contains information about the shipping portion of the amount. */ - @SerializedName("shipping") - Shipping shipping; - - /** Contains information about the tax portion of the amount. */ - @SerializedName("tax") - Tax tax; - - /** - * For more details about LineItem, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class LineItem extends StripeObject { - /** The amount an item was discounted for. Positive integer. */ - @SerializedName("discount_amount") - Long discountAmount; - - /** Unique identifier of the product. At most 12 characters long. */ - @SerializedName("product_code") - String productCode; - - /** Name of the product. At most 100 characters long. */ - @SerializedName("product_name") - String productName; - - /** Number of items of the product. Positive integer. */ - @SerializedName("quantity") - Long quantity; - - /** Contains information about the tax on the item. */ - @SerializedName("tax") - Tax tax; - - /** Cost of the product. Non-negative integer. */ - @SerializedName("unit_cost") - Long unitCost; - - /** Contains information about the tax on the item. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Tax extends StripeObject { - /** Total portion of the amount that is for tax. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; - } - } - - /** Contains information about the shipping portion of the amount. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Shipping extends StripeObject { - /** Portion of the amount that is for shipping. */ - @SerializedName("amount") - Long amount; - - /** The postal code that represents the shipping source. */ - @SerializedName("from_postal_code") - String fromPostalCode; - - /** The postal code that represents the shipping destination. */ - @SerializedName("to_postal_code") - String toPostalCode; - } - - /** Contains information about the tax portion of the amount. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Tax extends StripeObject { - /** Total portion of the amount that is for tax. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; - } - } - /** Details about the capture configuration for the OffSessionPayment. */ @Getter @Setter diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java index b85572b0c82..302f905d6b3 100644 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java +++ b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java @@ -11,7 +11,7 @@ @Getter @EqualsAndHashCode(callSuper = false) public class OffSessionPaymentCaptureParams extends ApiRequestParams { - /** Required. The amount to capture. */ + /** The amount to capture. */ @SerializedName("amount_to_capture") Long amountToCapture; @@ -104,7 +104,7 @@ public OffSessionPaymentCaptureParams build() { this.transferData); } - /** Required. The amount to capture. */ + /** The amount to capture. */ public Builder setAmountToCapture(Long amountToCapture) { this.amountToCapture = amountToCapture; return this; @@ -210,13 +210,6 @@ public static class TransferData { @SerializedName("amount") Long amount; - /** - * Required. The account (if any) that the payment is attributed to for tax - * reporting, and where funds from the payment are transferred to after payment success. - */ - @SerializedName("destination") - String destination; - /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -226,9 +219,8 @@ public static class TransferData { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private TransferData(Long amount, String destination, Map extraParams) { + private TransferData(Long amount, Map extraParams) { this.amount = amount; - this.destination = destination; this.extraParams = extraParams; } @@ -239,14 +231,11 @@ public static Builder builder() { public static class Builder { private Long amount; - private String destination; - private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public OffSessionPaymentCaptureParams.TransferData build() { - return new OffSessionPaymentCaptureParams.TransferData( - this.amount, this.destination, this.extraParams); + return new OffSessionPaymentCaptureParams.TransferData(this.amount, this.extraParams); } /** @@ -262,15 +251,6 @@ public Builder setAmount(Long amount) { return this; } - /** - * Required. The account (if any) that the payment is attributed to for tax - * reporting, and where funds from the payment are transferred to after payment success. - */ - public Builder setDestination(String destination) { - this.destination = destination; - 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 diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java index 594d724bfd7..3d27c0e2172 100644 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java @@ -4,9 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.v2.Amount; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -18,10 +16,6 @@ public class OffSessionPaymentCreateParams extends ApiRequestParams { @SerializedName("amount") Amount amount; - /** Provides industry-specific information about the amount. */ - @SerializedName("amount_details") - AmountDetails amountDetails; - /** Required. The frequency of the underlying payment. */ @SerializedName("cadence") Cadence cadence; @@ -30,10 +24,6 @@ public class OffSessionPaymentCreateParams extends ApiRequestParams { @SerializedName("capture") Capture capture; - /** Whether the OffSessionPayment should be captured automatically or manually. */ - @SerializedName("capture_method") - CaptureMethod captureMethod; - /** Required. ID of the Customer to which this OffSessionPayment belongs. */ @SerializedName("customer") String customer; @@ -110,10 +100,8 @@ public class OffSessionPaymentCreateParams extends ApiRequestParams { private OffSessionPaymentCreateParams( Amount amount, - AmountDetails amountDetails, Cadence cadence, Capture capture, - CaptureMethod captureMethod, String customer, Map extraParams, Map metadata, @@ -127,10 +115,8 @@ private OffSessionPaymentCreateParams( String testClock, TransferData transferData) { this.amount = amount; - this.amountDetails = amountDetails; this.cadence = cadence; this.capture = capture; - this.captureMethod = captureMethod; this.customer = customer; this.extraParams = extraParams; this.metadata = metadata; @@ -152,14 +138,10 @@ public static Builder builder() { public static class Builder { private Amount amount; - private AmountDetails amountDetails; - private Cadence cadence; private Capture capture; - private CaptureMethod captureMethod; - private String customer; private Map extraParams; @@ -188,10 +170,8 @@ public static class Builder { public OffSessionPaymentCreateParams build() { return new OffSessionPaymentCreateParams( this.amount, - this.amountDetails, this.cadence, this.capture, - this.captureMethod, this.customer, this.extraParams, this.metadata, @@ -212,12 +192,6 @@ public Builder setAmount(Amount amount) { return this; } - /** Provides industry-specific information about the amount. */ - public Builder setAmountDetails(OffSessionPaymentCreateParams.AmountDetails amountDetails) { - this.amountDetails = amountDetails; - return this; - } - /** Required. The frequency of the underlying payment. */ public Builder setCadence(OffSessionPaymentCreateParams.Cadence cadence) { this.cadence = cadence; @@ -230,12 +204,6 @@ public Builder setCapture(OffSessionPaymentCreateParams.Capture capture) { return this; } - /** Whether the OffSessionPayment should be captured automatically or manually. */ - public Builder setCaptureMethod(OffSessionPaymentCreateParams.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - /** Required. ID of the Customer to which this OffSessionPayment belongs. */ public Builder setCustomer(String customer) { this.customer = customer; @@ -366,542 +334,6 @@ public Builder setTransferData(OffSessionPaymentCreateParams.TransferData transf } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class AmountDetails { - /** The amount the total transaction was discounted for. */ - @SerializedName("discount_amount") - Long discountAmount; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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. A list of line items, each containing information about a product - * in the PaymentIntent. There is a maximum of 100 line items. - */ - @SerializedName("line_items") - List lineItems; - - /** Contains information about the shipping portion of the amount. */ - @SerializedName("shipping") - Shipping shipping; - - /** Contains information about the tax portion of the amount. */ - @SerializedName("tax") - Tax tax; - - private AmountDetails( - Long discountAmount, - Map extraParams, - List lineItems, - Shipping shipping, - Tax tax) { - this.discountAmount = discountAmount; - this.extraParams = extraParams; - this.lineItems = lineItems; - this.shipping = shipping; - this.tax = tax; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Long discountAmount; - - private Map extraParams; - - private List lineItems; - - private Shipping shipping; - - private Tax tax; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.AmountDetails build() { - return new OffSessionPaymentCreateParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); - } - - /** The amount the total transaction was discounted for. */ - public Builder setDiscountAmount(Long discountAmount) { - this.discountAmount = discountAmount; - 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 - * OffSessionPaymentCreateParams.AmountDetails#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams.AmountDetails#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call, - * and subsequent calls adds additional elements to the original list. See {@link - * OffSessionPaymentCreateParams.AmountDetails#lineItems} for the field documentation. - */ - public Builder addLineItem(OffSessionPaymentCreateParams.AmountDetails.LineItem element) { - if (this.lineItems == null) { - this.lineItems = new ArrayList<>(); - } - this.lineItems.add(element); - return this; - } - - /** - * Add all elements to `lineItems` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * OffSessionPaymentCreateParams.AmountDetails#lineItems} for the field documentation. - */ - public Builder addAllLineItem( - List elements) { - if (this.lineItems == null) { - this.lineItems = new ArrayList<>(); - } - this.lineItems.addAll(elements); - return this; - } - - /** Contains information about the shipping portion of the amount. */ - public Builder setShipping(OffSessionPaymentCreateParams.AmountDetails.Shipping shipping) { - this.shipping = shipping; - return this; - } - - /** Contains information about the tax portion of the amount. */ - public Builder setTax(OffSessionPaymentCreateParams.AmountDetails.Tax tax) { - this.tax = tax; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class LineItem { - /** The amount an item was discounted for. Positive integer. */ - @SerializedName("discount_amount") - Long discountAmount; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Unique identifier of the product. At most 12 characters long. */ - @SerializedName("product_code") - String productCode; - - /** Required. Name of the product. At most 100 characters long. */ - @SerializedName("product_name") - String productName; - - /** Required. Number of items of the product. Positive integer. */ - @SerializedName("quantity") - Long quantity; - - /** Contains information about the tax on the item. */ - @SerializedName("tax") - Tax tax; - - /** Required. Cost of the product. Non-negative integer. */ - @SerializedName("unit_cost") - Long unitCost; - - private LineItem( - Long discountAmount, - Map extraParams, - String productCode, - String productName, - Long quantity, - Tax tax, - Long unitCost) { - this.discountAmount = discountAmount; - this.extraParams = extraParams; - this.productCode = productCode; - this.productName = productName; - this.quantity = quantity; - this.tax = tax; - this.unitCost = unitCost; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Long discountAmount; - - private Map extraParams; - - private String productCode; - - private String productName; - - private Long quantity; - - private Tax tax; - - private Long unitCost; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.AmountDetails.LineItem build() { - return new OffSessionPaymentCreateParams.AmountDetails.LineItem( - this.discountAmount, - this.extraParams, - this.productCode, - this.productName, - this.quantity, - this.tax, - this.unitCost); - } - - /** The amount an item was discounted for. Positive integer. */ - public Builder setDiscountAmount(Long discountAmount) { - this.discountAmount = discountAmount; - 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 OffSessionPaymentCreateParams.AmountDetails.LineItem#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link OffSessionPaymentCreateParams.AmountDetails.LineItem#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** Unique identifier of the product. At most 12 characters long. */ - public Builder setProductCode(String productCode) { - this.productCode = productCode; - return this; - } - - /** Required. Name of the product. At most 100 characters long. */ - public Builder setProductName(String productName) { - this.productName = productName; - return this; - } - - /** Required. Number of items of the product. Positive integer. */ - public Builder setQuantity(Long quantity) { - this.quantity = quantity; - return this; - } - - /** Contains information about the tax on the item. */ - public Builder setTax(OffSessionPaymentCreateParams.AmountDetails.LineItem.Tax tax) { - this.tax = tax; - return this; - } - - /** Required. Cost of the product. Non-negative integer. */ - public Builder setUnitCost(Long unitCost) { - this.unitCost = unitCost; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Tax { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Total portion of the amount that is for tax. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; - - private Tax(Map extraParams, Long totalTaxAmount) { - this.extraParams = extraParams; - this.totalTaxAmount = totalTaxAmount; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Long totalTaxAmount; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.AmountDetails.LineItem.Tax build() { - return new OffSessionPaymentCreateParams.AmountDetails.LineItem.Tax( - this.extraParams, this.totalTaxAmount); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link OffSessionPaymentCreateParams.AmountDetails.LineItem.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 OffSessionPaymentCreateParams.AmountDetails.LineItem.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; - } - - /** Total portion of the amount that is for tax. */ - public Builder setTotalTaxAmount(Long totalTaxAmount) { - this.totalTaxAmount = totalTaxAmount; - return this; - } - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Shipping { - /** Portion of the amount that is for shipping. */ - @SerializedName("amount") - Long amount; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 postal code that represents the shipping source. */ - @SerializedName("from_postal_code") - String fromPostalCode; - - /** The postal code that represents the shipping destination. */ - @SerializedName("to_postal_code") - String toPostalCode; - - private Shipping( - Long amount, - Map extraParams, - String fromPostalCode, - String toPostalCode) { - this.amount = amount; - this.extraParams = extraParams; - this.fromPostalCode = fromPostalCode; - this.toPostalCode = toPostalCode; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Long amount; - - private Map extraParams; - - private String fromPostalCode; - - private String toPostalCode; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.AmountDetails.Shipping build() { - return new OffSessionPaymentCreateParams.AmountDetails.Shipping( - this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); - } - - /** Portion of the amount that is for shipping. */ - public Builder setAmount(Long amount) { - this.amount = amount; - 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 OffSessionPaymentCreateParams.AmountDetails.Shipping#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link OffSessionPaymentCreateParams.AmountDetails.Shipping#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** The postal code that represents the shipping source. */ - public Builder setFromPostalCode(String fromPostalCode) { - this.fromPostalCode = fromPostalCode; - return this; - } - - /** The postal code that represents the shipping destination. */ - public Builder setToPostalCode(String toPostalCode) { - this.toPostalCode = toPostalCode; - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Tax { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Total portion of the amount that is for tax. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; - - private Tax(Map extraParams, Long totalTaxAmount) { - this.extraParams = extraParams; - this.totalTaxAmount = totalTaxAmount; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Long totalTaxAmount; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.AmountDetails.Tax build() { - return new OffSessionPaymentCreateParams.AmountDetails.Tax( - this.extraParams, this.totalTaxAmount); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link OffSessionPaymentCreateParams.AmountDetails.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 OffSessionPaymentCreateParams.AmountDetails.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; - } - - /** Total portion of the amount that is for tax. */ - public Builder setTotalTaxAmount(Long totalTaxAmount) { - this.totalTaxAmount = totalTaxAmount; - return this; - } - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class Capture { @@ -1244,10 +676,7 @@ public static class RetryDetails { @SerializedName("retry_policy") String retryPolicy; - /** - * Required. Indicates the strategy for how you want Stripe to retry the - * payment. - */ + /** Indicates the strategy for how you want Stripe to retry the payment. */ @SerializedName("retry_strategy") RetryStrategy retryStrategy; @@ -1308,10 +737,7 @@ public Builder setRetryPolicy(String retryPolicy) { return this; } - /** - * Required. Indicates the strategy for how you want Stripe to retry the - * payment. - */ + /** Indicates the strategy for how you want Stripe to retry the payment. */ public Builder setRetryStrategy( OffSessionPaymentCreateParams.RetryDetails.RetryStrategy retryStrategy) { this.retryStrategy = retryStrategy; @@ -1320,17 +746,11 @@ public Builder setRetryStrategy( } public enum RetryStrategy implements ApiRequestParams.EnumParam { - @SerializedName("heuristic") - HEURISTIC("heuristic"), + @SerializedName("best_available") + BEST_AVAILABLE("best_available"), @SerializedName("none") - NONE("none"), - - @SerializedName("scheduled") - SCHEDULED("scheduled"), - - @SerializedName("smart") - SMART("smart"); + NONE("none"); @Getter(onMethod_ = {@Override}) private final String value; @@ -1459,19 +879,4 @@ public enum Cadence implements ApiRequestParams.EnumParam { this.value = value; } } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("automatic") - AUTOMATIC("automatic"), - - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } } diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 8feed7d3af9..a75933e4fe4 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -27256,7 +27256,6 @@ public void testV2PaymentsOffSessionPaymentPost3Services() throws StripeExceptio com.stripe.param.v2.payments.OffSessionPaymentCaptureParams params = com.stripe.param.v2.payments.OffSessionPaymentCaptureParams.builder() - .setAmountToCapture(1374310455L) .putMetadata("key", "metadata") .build(); From eeec996e3f67bb168fed399b1bf6c116e81cb99f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:17:56 +0000 Subject: [PATCH 07/17] Update generated code for v2113 and --- API_VERSION | 2 +- .../java/com/stripe/param/WebhookEndpointCreateParams.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/API_VERSION b/API_VERSION index 8ab5aad442e..afa88f5303c 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -6e09523f05606953bb23892f6c4e3fe58fe5ce92 \ No newline at end of file +125d391b75519fa8a44e8fdd6c482ca583fe8294 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index b11e22a20e9..e8832785c89 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -633,7 +633,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_09_30_CLOVER("2025-09-30.clover"), @SerializedName("2025-10-29.clover") - VERSION_2025_10_29_CLOVER("2025-10-29.clover"); + VERSION_2025_10_29_CLOVER("2025-10-29.clover"), + + @SerializedName("2025-11-17.clover") + VERSION_2025_11_17_CLOVER("2025-11-17.clover"); @Getter(onMethod_ = {@Override}) private final String value; From cbdf09339e05c042b933f57f0c8529d170109b30 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sun, 9 Nov 2025 23:42:48 +0000 Subject: [PATCH 08/17] Update generated code for v2113 and --- API_VERSION | 2 +- ...thEventGenerationFailureResolvedEvent.java | 64 +++++++++++++++++++ ...ationFailureResolvedEventNotification.java | 14 ++++ .../stripe/model/v2/EventDataClassLookup.java | 3 + .../v2/EventNotificationClassLookup.java | 3 + 5 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEventNotification.java diff --git a/API_VERSION b/API_VERSION index afa88f5303c..0eb25f0f63d 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -125d391b75519fa8a44e8fdd6c482ca583fe8294 \ No newline at end of file +30548eb63bda9b0c49c54b3ff449525f9d83b761 \ No newline at end of file diff --git a/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEvent.java new file mode 100644 index 00000000000..99cafdf011a --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEvent.java @@ -0,0 +1,64 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.v2.core.Event; +import java.time.Instant; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreHealthEventGenerationFailureResolvedEvent extends Event { + /** Data for the v2.core.health.event_generation_failure.resolved event. */ + @SerializedName("data") + V2CoreHealthEventGenerationFailureResolvedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The alert ID. */ + @SerializedName("alert_id") + String alertId; + /** The grouping key for the alert. */ + @SerializedName("grouping_key") + String groupingKey; + /** The user impact. */ + @SerializedName("impact") + Impact impact; + /** The time when the user experience has returned to expected levels. */ + @SerializedName("resolved_at") + Instant resolvedAt; + /** A short description of the alert. */ + @SerializedName("summary") + String summary; + + public static final class Impact { + /** + * The context the event should have been generated for. Only present when the account is a + * connected account. + */ + @SerializedName("context") + String context; + /** The type of event that Stripe failed to generate. */ + @SerializedName("event_type") + String eventType; + /** The related object details. */ + @SerializedName("related_object") + com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEvent.EventData.Impact + .RelatedObject + relatedObject; + + public static final class RelatedObject { + /** The ID of the related object (e.g., "pi_..."). */ + @SerializedName("id") + String id; + /** The type of the related object (e.g., "payment_intent"). */ + @SerializedName("type") + String type; + /** The API URL for the related object (e.g., "/v1/payment_intents/pi_..."). */ + @SerializedName("url") + String url; + } + } + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEventNotification.java new file mode 100644 index 00000000000..1056c1680a9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEventNotification.java @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.EventNotification; + +public final class V2CoreHealthEventGenerationFailureResolvedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthEventGenerationFailureResolvedEvent fetchEvent() throws StripeException { + return (V2CoreHealthEventGenerationFailureResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 4f44b081d4c..01b15a553a0 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -156,6 +156,9 @@ public final class EventDataClassLookup { "v2.core.account_person.updated", com.stripe.events.V2CoreAccountPersonUpdatedEvent.class); eventClassLookup.put( "v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEvent.class); + eventClassLookup.put( + "v2.core.health.event_generation_failure.resolved", + com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEvent.class); eventClassLookup.put( "v2.money_management.adjustment.created", com.stripe.events.V2MoneyManagementAdjustmentCreatedEvent.class); diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index 96073e31fd2..ca93475a578 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -87,6 +87,9 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEventNotification.class); + eventClassLookup.put( + "v2.core.health.event_generation_failure.resolved", + com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEventNotification.class); eventClassLookup.put( "v2.money_management.adjustment.created", com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification.class); From b2ee82a691fe01486c6260f2e1c73d929ec9a2e2 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sun, 9 Nov 2025 23:52:20 +0000 Subject: [PATCH 09/17] Update generated code for v2114 and --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- src/main/java/com/stripe/model/Account.java | 27 + .../java/com/stripe/model/BankAccount.java | 26 +- src/main/java/com/stripe/model/Charge.java | 4 + .../com/stripe/model/ConfirmationToken.java | 3 +- src/main/java/com/stripe/model/Event.java | 38 +- .../stripe/model/PaymentAttemptRecord.java | 24 +- .../java/com/stripe/model/PaymentMethod.java | 3 +- .../java/com/stripe/model/PaymentRecord.java | 24 +- src/main/java/com/stripe/model/Refund.java | 35 + .../java/com/stripe/model/Subscription.java | 4 +- .../model/billingportal/Configuration.java | 9 + .../stripe/model/capital/FinancingOffer.java | 14 +- .../model/capital/FinancingSummary.java | 17 +- .../model/financialconnections/Account.java | 38 + .../com/stripe/param/AccountCreateParams.java | 134 + .../com/stripe/param/AccountUpdateParams.java | 134 + .../com/stripe/param/ChargeCaptureParams.java | 8965 +++- .../com/stripe/param/ChargeUpdateParams.java | 9828 +++- ...alanceTransactionCollectionListParams.java | 142 +- .../CustomerBalanceTransactionListParams.java | 141 +- .../CustomerBalanceTransactionsParams.java | 141 +- .../param/InvoicePaymentListParams.java | 130 + .../com/stripe/param/OrderCreateParams.java | 6580 ++- .../com/stripe/param/OrderUpdateParams.java | 7235 ++- .../param/PaymentIntentCaptureParams.java | 9059 +++- .../param/PaymentIntentConfirmParams.java | 41261 +++++++++------ .../param/PaymentIntentCreateParams.java | 41289 +++++++++------ .../param/PaymentIntentUpdateParams.java | 42253 ++++++++++------ .../stripe/param/PaymentMethodListParams.java | 56 + .../param/WebhookEndpointCreateParams.java | 11 + .../param/WebhookEndpointUpdateParams.java | 11 + .../analytics/MeterUsageRetrieveParams.java | 30 +- .../issuing/AuthorizationCreateParams.java | 142 +- .../param/tax/RegistrationCreateParams.java | 14 +- 36 files changed, 120457 insertions(+), 47369 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5c19124a9fa..f23e431db4c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2113 \ No newline at end of file +v2114 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index afd35346caf..b71201060b4 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-10-29.preview"; + public static final String CURRENT = "2025-11-17.preview"; } diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 1e45c80852f..9d26571ce02 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -776,6 +776,13 @@ public static class BusinessProfile extends StripeObject { @SerializedName("product_description") String productDescription; + /** + * A link to the business's publicly available terms related to the Specified Commercial + * Transaction Act. Only used for accounts in Japan. + */ + @SerializedName("specified_commercial_transactions_act_url") + String specifiedCommercialTransactionsActUrl; + /** A publicly available mailing address for sending support issues to. */ @SerializedName("support_address") Address supportAddress; @@ -2584,6 +2591,9 @@ public static class Settings extends StripeObject { @SerializedName("payouts") Payouts payouts; + @SerializedName("paypay_payments") + PaypayPayments paypayPayments; + @SerializedName("sepa_debit_payments") SepaDebitPayments sepaDebitPayments; @@ -3058,6 +3068,23 @@ public static class Schedule extends StripeObject { } } + /** + * For more details about PaypayPayments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaypayPayments extends StripeObject { + /** + * Whether your business sells digital content or not. + * + *

One of {@code digital_content}, or {@code other}. + */ + @SerializedName("goods_type") + String goodsType; + } + /** * For more details about SepaDebitPayments, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index 7431969d2d4..d46c75c332f 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -156,20 +156,24 @@ public class BankAccount extends ApiResource /** * For bank accounts, possible values are {@code new}, {@code validated}, {@code verified}, {@code - * verification_failed}, or {@code errored}. A bank account that hasn't had any activity or - * validation performed is {@code new}. If Stripe can determine that the bank account exists, its - * status will be {@code validated}. Note that there often isn’t enough information to know (e.g., - * for smaller credit unions), and the validation is not always run. If customer bank account - * verification has succeeded, the bank account status will be {@code verified}. If the - * verification failed for any reason, such as microdeposit failure, the status will be {@code - * verification_failed}. If a payout sent to this bank account fails, we'll set the status to - * {@code errored} and will not continue to send scheduled payouts until the bank * details are updated. * - *

For external accounts, possible values are {@code new}, {@code errored} and {@code - * verification_failed}. If a payout fails, the status is set to {@code errored} and scheduled - * payouts are stopped until account details are updated. In the US and India, if we can't For external accounts, possible values are {@code new}, {@code errored}, {@code + * verification_failed}, and {@code tokenized_account_number_deactivated}. If a payout fails, the + * status is set to {@code errored} and scheduled payouts are stopped until account details are + * updated. In the US and India, if we can't verify the * owner of the bank account, we'll set the status to {@code verification_failed}. Other * validations aren't run against external accounts because they're only used for payouts. This diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 1faa0ea3319..da962686ef9 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2988,6 +2988,10 @@ public static class Ideal extends StripeObject { @SerializedName("iban_last4") String ibanLast4; + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + /** * Owner's verified full name. Values are verified or provided by iDEAL directly (if * supported) at the time of authorization or settlement. They cannot be set or mutated. diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 2b016fcdfd0..70001e3d6a6 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -2536,7 +2536,8 @@ public static class Blocked extends StripeObject { * *

One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code * bank_account_invalid_details}, {@code bank_account_restricted}, {@code - * bank_account_unusable}, or {@code debit_not_authorized}. + * bank_account_unusable}, {@code debit_not_authorized}, or {@code + * tokenized_account_number_deactivated}. */ @SerializedName("reason") String reason; diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index fcfc0572adf..e16e30c7cad 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -116,24 +116,24 @@ public class Event extends ApiResource implements HasId { * {@code balance_settings.updated}, {@code billing.alert.triggered}, {@code * billing_portal.configuration.created}, {@code billing_portal.configuration.updated}, {@code * billing_portal.session.created}, {@code capability.updated}, {@code - * capital.financing_offer.accepted}, {@code capital.financing_offer.canceled}, {@code - * capital.financing_offer.created}, {@code capital.financing_offer.expired}, {@code - * capital.financing_offer.fully_repaid}, {@code capital.financing_offer.paid_out}, {@code - * capital.financing_offer.rejected}, {@code capital.financing_offer.replacement_created}, {@code - * capital.financing_transaction.created}, {@code cash_balance.funds_available}, {@code - * charge.captured}, {@code charge.dispute.closed}, {@code charge.dispute.created}, {@code - * charge.dispute.funds_reinstated}, {@code charge.dispute.funds_withdrawn}, {@code - * charge.dispute.updated}, {@code charge.expired}, {@code charge.failed}, {@code charge.pending}, - * {@code charge.refund.updated}, {@code charge.refunded}, {@code charge.succeeded}, {@code - * charge.updated}, {@code checkout.session.async_payment_failed}, {@code - * checkout.session.async_payment_succeeded}, {@code checkout.session.completed}, {@code - * checkout.session.expired}, {@code climate.order.canceled}, {@code climate.order.created}, - * {@code climate.order.delayed}, {@code climate.order.delivered}, {@code - * climate.order.product_substituted}, {@code climate.product.created}, {@code - * climate.product.pricing_updated}, {@code coupon.created}, {@code coupon.deleted}, {@code - * coupon.updated}, {@code credit_note.created}, {@code credit_note.updated}, {@code - * credit_note.voided}, {@code customer.created}, {@code customer.deleted}, {@code - * customer.discount.created}, {@code customer.discount.deleted}, {@code + * capital.financing_offer.accepted}, {@code capital.financing_offer.accepted_other_offer}, {@code + * capital.financing_offer.canceled}, {@code capital.financing_offer.created}, {@code + * capital.financing_offer.expired}, {@code capital.financing_offer.fully_repaid}, {@code + * capital.financing_offer.paid_out}, {@code capital.financing_offer.rejected}, {@code + * capital.financing_offer.replacement_created}, {@code capital.financing_transaction.created}, + * {@code cash_balance.funds_available}, {@code charge.captured}, {@code charge.dispute.closed}, + * {@code charge.dispute.created}, {@code charge.dispute.funds_reinstated}, {@code + * charge.dispute.funds_withdrawn}, {@code charge.dispute.updated}, {@code charge.expired}, {@code + * charge.failed}, {@code charge.pending}, {@code charge.refund.updated}, {@code charge.refunded}, + * {@code charge.succeeded}, {@code charge.updated}, {@code + * checkout.session.async_payment_failed}, {@code checkout.session.async_payment_succeeded}, + * {@code checkout.session.completed}, {@code checkout.session.expired}, {@code + * climate.order.canceled}, {@code climate.order.created}, {@code climate.order.delayed}, {@code + * climate.order.delivered}, {@code climate.order.product_substituted}, {@code + * climate.product.created}, {@code climate.product.pricing_updated}, {@code coupon.created}, + * {@code coupon.deleted}, {@code coupon.updated}, {@code credit_note.created}, {@code + * credit_note.updated}, {@code credit_note.voided}, {@code customer.created}, {@code + * customer.deleted}, {@code customer.discount.created}, {@code customer.discount.deleted}, {@code * customer.discount.updated}, {@code customer.source.created}, {@code customer.source.deleted}, * {@code customer.source.expiring}, {@code customer.source.updated}, {@code * customer.subscription.collection_paused}, {@code customer.subscription.collection_resumed}, @@ -146,6 +146,7 @@ public class Event extends ApiResource implements HasId { * customer.tax_id.created}, {@code customer.tax_id.deleted}, {@code customer.tax_id.updated}, * {@code customer.updated}, {@code customer_cash_balance_transaction.created}, {@code * entitlements.active_entitlement_summary.updated}, {@code file.created}, {@code + * financial_connections.account.account_numbers_updated}, {@code * financial_connections.account.created}, {@code financial_connections.account.deactivated}, * {@code financial_connections.account.disconnected}, {@code * financial_connections.account.reactivated}, {@code @@ -153,6 +154,7 @@ public class Event extends ApiResource implements HasId { * financial_connections.account.refreshed_inferred_balances}, {@code * financial_connections.account.refreshed_ownership}, {@code * financial_connections.account.refreshed_transactions}, {@code + * financial_connections.account.upcoming_account_number_expiry}, {@code * financial_connections.session.updated}, {@code fx_quote.expired}, {@code * identity.verification_session.canceled}, {@code identity.verification_session.created}, {@code * identity.verification_session.processing}, {@code identity.verification_session.redacted}, diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index d597a64705a..d774b741b88 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -591,7 +591,6 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("type") String type; - /** Details of the US Bank Account used for this payment attempt. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -1906,6 +1905,10 @@ public static class Ideal extends StripeObject { @SerializedName("iban_last4") String ibanLast4; + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + /** * Owner's verified full name. Values are verified or provided by iDEAL directly (if * supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -3079,14 +3082,27 @@ public static class Swish extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Twint extends StripeObject {} - /** Details of the US Bank Account used for this payment attempt. */ + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount extends StripeObject { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + * + *

One of {@code company}, or {@code individual}. + */ @SerializedName("account_holder_type") String accountHolderType; + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + * + *

One of {@code checking}, or {@code savings}. + */ @SerializedName("account_type") String accountType; @@ -3111,11 +3127,11 @@ public static class UsBankAccount extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField mandate; - /** Reference number to locate ACH payments with customer’s bank. */ + /** The ACH payment reference for this transaction. */ @SerializedName("payment_reference") String paymentReference; - /** Routing number of the bank account. */ + /** The routing number for the bank account. */ @SerializedName("routing_number") String routingNumber; diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index e9493807d2c..bc7dbcfbb56 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -2830,7 +2830,8 @@ public static class Blocked extends StripeObject { * *

One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code * bank_account_invalid_details}, {@code bank_account_restricted}, {@code - * bank_account_unusable}, or {@code debit_not_authorized}. + * bank_account_unusable}, {@code debit_not_authorized}, or {@code + * tokenized_account_number_deactivated}. */ @SerializedName("reason") String reason; diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index 660d2fd45d7..daacf99eec0 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -885,7 +885,6 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("type") String type; - /** Details of the US Bank Account used for this payment attempt. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -2200,6 +2199,10 @@ public static class Ideal extends StripeObject { @SerializedName("iban_last4") String ibanLast4; + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + /** * Owner's verified full name. Values are verified or provided by iDEAL directly (if * supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -3372,14 +3375,27 @@ public static class Swish extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Twint extends StripeObject {} - /** Details of the US Bank Account used for this payment attempt. */ + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount extends StripeObject { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + * + *

One of {@code company}, or {@code individual}. + */ @SerializedName("account_holder_type") String accountHolderType; + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + * + *

One of {@code checking}, or {@code savings}. + */ @SerializedName("account_type") String accountType; @@ -3404,11 +3420,11 @@ public static class UsBankAccount extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField mandate; - /** Reference number to locate ACH payments with customer’s bank. */ + /** The ACH payment reference for this transaction. */ @SerializedName("payment_reference") String paymentReference; - /** Routing number of the bank account. */ + /** The routing number for the bank account. */ @SerializedName("routing_number") String routingNumber; diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index 6d4b6bd2052..025ed8e0215 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -655,6 +655,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("klarna") Klarna klarna; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("multibanco") Multibanco multibanco; @@ -688,6 +691,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("th_bank_transfer") ThBankTransfer thBankTransfer; + @SerializedName("twint") + Twint twint; + /** * The type of transaction-specific details of the payment method used in the refund (e.g., * {@code card}). An additional hash is included on {@code destination_details} with a name @@ -985,6 +991,26 @@ public static class JpBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject {} + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject { + /** The reference assigned to the refund. */ + @SerializedName("reference") + String reference; + + /** + * Status of the reference on the refund. This can be {@code pending}, {@code available} or + * {@code unavailable}. + */ + @SerializedName("reference_status") + String referenceStatus; + } + /** * For more details about Multibanco, please refer to the API Reference. @@ -1153,6 +1179,15 @@ public static class ThBankTransfer extends StripeObject { String referenceStatus; } + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject {} + /** * For more details about UsBankTransfer, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index 2dd79e05df7..5985d78778d 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -1522,7 +1522,7 @@ public static class BillingSchedule extends StripeObject { @SerializedName("applies_to") List appliesTo; - /** Specifies the billing period. */ + /** Specifies the end of billing period. */ @SerializedName("bill_until") BillUntil billUntil; @@ -1568,7 +1568,7 @@ public void setPriceObject(Price expandableObject) { } } - /** Specifies the billing period. */ + /** Specifies the end of billing period. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index 917bad09db9..0b40cf7943f 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -365,6 +365,15 @@ public static class PaymentMethodUpdate extends StripeObject { /** Whether the feature is enabled. */ @SerializedName("enabled") Boolean enabled; + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able to + * update their payment method to one of the options specified by the payment method + * configuration. If not set, the default payment method configuration is used. + */ + @SerializedName("payment_method_configuration") + String paymentMethodConfiguration; } /** diff --git a/src/main/java/com/stripe/model/capital/FinancingOffer.java b/src/main/java/com/stripe/model/capital/FinancingOffer.java index 712975315f6..38721c2f53c 100644 --- a/src/main/java/com/stripe/model/capital/FinancingOffer.java +++ b/src/main/java/com/stripe/model/capital/FinancingOffer.java @@ -293,8 +293,7 @@ public static FinancingOffer retrieve( @EqualsAndHashCode(callSuper = false) public static class AcceptedTerms extends StripeObject { /** - * Amount of financing offered, in minor units. For example, $1,000 USD will be represented as - * 100000. + * Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000. */ @SerializedName("advance_amount") Long advanceAmount; @@ -303,7 +302,7 @@ public static class AcceptedTerms extends StripeObject { @SerializedName("currency") String currency; - /** Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. */ + /** Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. */ @SerializedName("fee_amount") Long feeAmount; @@ -314,7 +313,7 @@ public static class AcceptedTerms extends StripeObject { @SerializedName("previous_financing_fee_discount_amount") Long previousFinancingFeeDiscountAmount; - /** Per-transaction rate at which Stripe will withhold funds to repay the financing. */ + /** Per-transaction rate at which Stripe withholds funds to repay the financing. */ @SerializedName("withhold_rate") BigDecimal withholdRate; } @@ -328,8 +327,7 @@ public static class AcceptedTerms extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class OfferedTerms extends StripeObject { /** - * Amount of financing offered, in minor units. For example, $1,000 USD will be represented as - * 100000. + * Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000. */ @SerializedName("advance_amount") Long advanceAmount; @@ -347,7 +345,7 @@ public static class OfferedTerms extends StripeObject { @SerializedName("currency") String currency; - /** Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. */ + /** Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. */ @SerializedName("fee_amount") Long feeAmount; @@ -360,7 +358,7 @@ public static class OfferedTerms extends StripeObject { @SerializedName("previous_financing_fee_discount_rate") BigDecimal previousFinancingFeeDiscountRate; - /** Per-transaction rate at which Stripe will withhold funds to repay the financing. */ + /** Per-transaction rate at which Stripe withholds funds to repay the financing. */ @SerializedName("withhold_rate") BigDecimal withholdRate; } diff --git a/src/main/java/com/stripe/model/capital/FinancingSummary.java b/src/main/java/com/stripe/model/capital/FinancingSummary.java index 722c523cf11..c018644b6f4 100644 --- a/src/main/java/com/stripe/model/capital/FinancingSummary.java +++ b/src/main/java/com/stripe/model/capital/FinancingSummary.java @@ -98,8 +98,7 @@ public static FinancingSummary retrieve( @EqualsAndHashCode(callSuper = false) public static class Details extends StripeObject { /** - * Amount of financing offered, in minor units. For example, $1,000 USD will be represented as - * 100000. + * Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000. */ @SerializedName("advance_amount") Long advanceAmount; @@ -119,20 +118,20 @@ public static class Details extends StripeObject { @SerializedName("current_repayment_interval") CurrentRepaymentInterval currentRepaymentInterval; - /** Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. */ + /** Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. */ @SerializedName("fee_amount") Long feeAmount; /** * The amount the Connected account has paid toward the financing debt so far, in minor units. - * For example, $1,000 USD will be represented as 100000. + * For example, 1,000 USD is represented as 100000. */ @SerializedName("paid_amount") Long paidAmount; /** - * The balance remaining to be paid on the financing, in minor units. For example, $1,000 USD - * will be represented as 100000. + * The balance remaining to be paid on the financing, in minor units. For example, 1,000 USD is + * represented as 100000. */ @SerializedName("remaining_amount") Long remainingAmount; @@ -144,7 +143,7 @@ public static class Details extends StripeObject { @SerializedName("repayments_begin_at") BigDecimal repaymentsBeginAt; - /** Per-transaction rate at which Stripe will withhold funds to repay the financing. */ + /** Per-transaction rate at which Stripe withholds funds to repay the financing. */ @SerializedName("withhold_rate") BigDecimal withholdRate; @@ -163,14 +162,14 @@ public static class CurrentRepaymentInterval extends StripeObject { /** * The amount that has already been paid in the current repayment interval, in minor units. - * For example, $100 USD will be represented as 10000. + * For example, 100 USD is represented as 10000. */ @SerializedName("paid_amount") Long paidAmount; /** * The amount that is yet to be paid in the current repayment interval, in minor units. For - * example, $100 USD will be represented as 10000. + * example, 100 USD is represented as 10000. */ @SerializedName("remaining_amount") Long remainingAmount; diff --git a/src/main/java/com/stripe/model/financialconnections/Account.java b/src/main/java/com/stripe/model/financialconnections/Account.java index 143a5aa6f3e..16655cc3a85 100644 --- a/src/main/java/com/stripe/model/financialconnections/Account.java +++ b/src/main/java/com/stripe/model/financialconnections/Account.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; +import com.stripe.model.Account; import com.stripe.model.Customer; import com.stripe.model.ExpandableField; import com.stripe.model.HasId; @@ -38,6 +39,10 @@ public class Account extends ApiResource implements HasId { @SerializedName("account_holder") AccountHolder accountHolder; + /** Details about the account numbers. */ + @SerializedName("account_numbers") + List accountNumbers; + /** The most recent information about the account's balance. */ @SerializedName("balance") Balance balance; @@ -609,6 +614,39 @@ public void setCustomerObject(Customer expandableObject) { } } + /** + * For more details about AccountNumber, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountNumber extends StripeObject { + /** When the account number is expected to expire, if applicable. */ + @SerializedName("expected_expiry_date") + Long expectedExpiryDate; + + /** + * The type of account number associated with the account. + * + *

One of {@code account_number}, or {@code tokenized_account_number}. + */ + @SerializedName("identifier_type") + String identifierType; + + /** + * Whether the account number is currently active and usable for transactions. + * + *

One of {@code deactivated}, or {@code transactable}. + */ + @SerializedName("status") + String status; + + /** The payment networks that the account number can be used for. */ + @SerializedName("supported_networks") + List supportedNetworks; + } + /** * For more details about Balance, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index d265680014d..90d13da9236 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -650,6 +650,13 @@ public static class BusinessProfile { @SerializedName("product_description") String productDescription; + /** + * A link to the business's publicly available terms related to the Specified Commercial + * Transaction Act. Used by the Checkout product and for Japanese payment methods. + */ + @SerializedName("specified_commercial_transactions_act_url") + Object specifiedCommercialTransactionsActUrl; + /** A publicly available mailing address for sending support issues to. */ @SerializedName("support_address") SupportAddress supportAddress; @@ -680,6 +687,7 @@ private BusinessProfile( MonthlyEstimatedRevenue monthlyEstimatedRevenue, String name, String productDescription, + Object specifiedCommercialTransactionsActUrl, SupportAddress supportAddress, String supportEmail, String supportPhone, @@ -693,6 +701,7 @@ private BusinessProfile( this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; this.name = name; this.productDescription = productDescription; + this.specifiedCommercialTransactionsActUrl = specifiedCommercialTransactionsActUrl; this.supportAddress = supportAddress; this.supportEmail = supportEmail; this.supportPhone = supportPhone; @@ -722,6 +731,8 @@ public static class Builder { private String productDescription; + private Object specifiedCommercialTransactionsActUrl; + private SupportAddress supportAddress; private String supportEmail; @@ -743,6 +754,7 @@ public AccountCreateParams.BusinessProfile build() { this.monthlyEstimatedRevenue, this.name, this.productDescription, + this.specifiedCommercialTransactionsActUrl, this.supportAddress, this.supportEmail, this.supportPhone, @@ -857,6 +869,26 @@ public Builder setProductDescription(String productDescription) { return this; } + /** + * A link to the business's publicly available terms related to the Specified Commercial + * Transaction Act. Used by the Checkout product and for Japanese payment methods. + */ + public Builder setSpecifiedCommercialTransactionsActUrl( + String specifiedCommercialTransactionsActUrl) { + this.specifiedCommercialTransactionsActUrl = specifiedCommercialTransactionsActUrl; + return this; + } + + /** + * A link to the business's publicly available terms related to the Specified Commercial + * Transaction Act. Used by the Checkout product and for Japanese payment methods. + */ + public Builder setSpecifiedCommercialTransactionsActUrl( + EmptyParam specifiedCommercialTransactionsActUrl) { + this.specifiedCommercialTransactionsActUrl = specifiedCommercialTransactionsActUrl; + return this; + } + /** A publicly available mailing address for sending support issues to. */ public Builder setSupportAddress( AccountCreateParams.BusinessProfile.SupportAddress supportAddress) { @@ -14087,6 +14119,10 @@ public static class Settings { @SerializedName("payouts") Payouts payouts; + /** Settings specific to the PayPay payments method. */ + @SerializedName("paypay_payments") + PaypayPayments paypayPayments; + /** Settings specific to the account's tax forms. */ @SerializedName("tax_forms") TaxForms taxForms; @@ -14106,6 +14142,7 @@ private Settings( Invoices invoices, Payments payments, Payouts payouts, + PaypayPayments paypayPayments, TaxForms taxForms, Treasury treasury) { this.bacsDebitPayments = bacsDebitPayments; @@ -14118,6 +14155,7 @@ private Settings( this.invoices = invoices; this.payments = payments; this.payouts = payouts; + this.paypayPayments = paypayPayments; this.taxForms = taxForms; this.treasury = treasury; } @@ -14147,6 +14185,8 @@ public static class Builder { private Payouts payouts; + private PaypayPayments paypayPayments; + private TaxForms taxForms; private Treasury treasury; @@ -14164,6 +14204,7 @@ public AccountCreateParams.Settings build() { this.invoices, this.payments, this.payouts, + this.paypayPayments, this.taxForms, this.treasury); } @@ -14253,6 +14294,12 @@ public Builder setPayouts(AccountCreateParams.Settings.Payouts payouts) { return this; } + /** Settings specific to the PayPay payments method. */ + public Builder setPaypayPayments(AccountCreateParams.Settings.PaypayPayments paypayPayments) { + this.paypayPayments = paypayPayments; + return this; + } + /** Settings specific to the account's tax forms. */ public Builder setTaxForms(AccountCreateParams.Settings.TaxForms taxForms) { this.taxForms = taxForms; @@ -15914,6 +15961,93 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaypayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether your business sells digital content or not. */ + @SerializedName("goods_type") + GoodsType goodsType; + + private PaypayPayments(Map extraParams, GoodsType goodsType) { + this.extraParams = extraParams; + this.goodsType = goodsType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private GoodsType goodsType; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Settings.PaypayPayments build() { + return new AccountCreateParams.Settings.PaypayPayments(this.extraParams, this.goodsType); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Settings.PaypayPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Settings.PaypayPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether your business sells digital content or not. */ + public Builder setGoodsType( + AccountCreateParams.Settings.PaypayPayments.GoodsType goodsType) { + this.goodsType = goodsType; + return this; + } + } + + public enum GoodsType implements ApiRequestParams.EnumParam { + @SerializedName("digital_content") + DIGITAL_CONTENT("digital_content"), + + @SerializedName("other") + OTHER("other"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + GoodsType(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class TaxForms { diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index b2e7726a895..84cdb00e03f 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -637,6 +637,13 @@ public static class BusinessProfile { @SerializedName("product_description") Object productDescription; + /** + * A link to the business's publicly available terms related to the Specified Commercial + * Transaction Act. Only used for accounts in Japan. + */ + @SerializedName("specified_commercial_transactions_act_url") + Object specifiedCommercialTransactionsActUrl; + /** A publicly available mailing address for sending support issues to. */ @SerializedName("support_address") SupportAddress supportAddress; @@ -667,6 +674,7 @@ private BusinessProfile( MonthlyEstimatedRevenue monthlyEstimatedRevenue, Object name, Object productDescription, + Object specifiedCommercialTransactionsActUrl, SupportAddress supportAddress, Object supportEmail, Object supportPhone, @@ -680,6 +688,7 @@ private BusinessProfile( this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; this.name = name; this.productDescription = productDescription; + this.specifiedCommercialTransactionsActUrl = specifiedCommercialTransactionsActUrl; this.supportAddress = supportAddress; this.supportEmail = supportEmail; this.supportPhone = supportPhone; @@ -709,6 +718,8 @@ public static class Builder { private Object productDescription; + private Object specifiedCommercialTransactionsActUrl; + private SupportAddress supportAddress; private Object supportEmail; @@ -730,6 +741,7 @@ public AccountUpdateParams.BusinessProfile build() { this.monthlyEstimatedRevenue, this.name, this.productDescription, + this.specifiedCommercialTransactionsActUrl, this.supportAddress, this.supportEmail, this.supportPhone, @@ -869,6 +881,26 @@ public Builder setProductDescription(EmptyParam productDescription) { return this; } + /** + * A link to the business's publicly available terms related to the Specified Commercial + * Transaction Act. Only used for accounts in Japan. + */ + public Builder setSpecifiedCommercialTransactionsActUrl( + String specifiedCommercialTransactionsActUrl) { + this.specifiedCommercialTransactionsActUrl = specifiedCommercialTransactionsActUrl; + return this; + } + + /** + * A link to the business's publicly available terms related to the Specified Commercial + * Transaction Act. Only used for accounts in Japan. + */ + public Builder setSpecifiedCommercialTransactionsActUrl( + EmptyParam specifiedCommercialTransactionsActUrl) { + this.specifiedCommercialTransactionsActUrl = specifiedCommercialTransactionsActUrl; + return this; + } + /** A publicly available mailing address for sending support issues to. */ public Builder setSupportAddress( AccountUpdateParams.BusinessProfile.SupportAddress supportAddress) { @@ -14090,6 +14122,10 @@ public static class Settings { @SerializedName("payouts") Payouts payouts; + /** Settings specific to the PayPay payments method. */ + @SerializedName("paypay_payments") + PaypayPayments paypayPayments; + /** Settings specific to the account's tax forms. */ @SerializedName("tax_forms") TaxForms taxForms; @@ -14109,6 +14145,7 @@ private Settings( Invoices invoices, Payments payments, Payouts payouts, + PaypayPayments paypayPayments, TaxForms taxForms, Treasury treasury) { this.bacsDebitPayments = bacsDebitPayments; @@ -14121,6 +14158,7 @@ private Settings( this.invoices = invoices; this.payments = payments; this.payouts = payouts; + this.paypayPayments = paypayPayments; this.taxForms = taxForms; this.treasury = treasury; } @@ -14150,6 +14188,8 @@ public static class Builder { private Payouts payouts; + private PaypayPayments paypayPayments; + private TaxForms taxForms; private Treasury treasury; @@ -14167,6 +14207,7 @@ public AccountUpdateParams.Settings build() { this.invoices, this.payments, this.payouts, + this.paypayPayments, this.taxForms, this.treasury); } @@ -14256,6 +14297,12 @@ public Builder setPayouts(AccountUpdateParams.Settings.Payouts payouts) { return this; } + /** Settings specific to the PayPay payments method. */ + public Builder setPaypayPayments(AccountUpdateParams.Settings.PaypayPayments paypayPayments) { + this.paypayPayments = paypayPayments; + return this; + } + /** Settings specific to the account's tax forms. */ public Builder setTaxForms(AccountUpdateParams.Settings.TaxForms taxForms) { this.taxForms = taxForms; @@ -16101,6 +16148,93 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaypayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether your business sells digital content or not. */ + @SerializedName("goods_type") + GoodsType goodsType; + + private PaypayPayments(Map extraParams, GoodsType goodsType) { + this.extraParams = extraParams; + this.goodsType = goodsType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private GoodsType goodsType; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Settings.PaypayPayments build() { + return new AccountUpdateParams.Settings.PaypayPayments(this.extraParams, this.goodsType); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Settings.PaypayPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Settings.PaypayPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether your business sells digital content or not. */ + public Builder setGoodsType( + AccountUpdateParams.Settings.PaypayPayments.GoodsType goodsType) { + this.goodsType = goodsType; + return this; + } + } + + public enum GoodsType implements ApiRequestParams.EnumParam { + @SerializedName("digital_content") + DIGITAL_CONTENT("digital_content"), + + @SerializedName("other") + OTHER("other"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + GoodsType(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class TaxForms { diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index cbad3fd300c..169b5f9a5b2 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -306,6 +306,10 @@ public static class PaymentDetails { @SerializedName("car_rental") CarRental carRental; + /** Car rental data for this PaymentIntent. */ + @SerializedName("car_rental_data") + Object carRentalData; + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -332,10 +336,18 @@ public static class PaymentDetails { @SerializedName("flight") Flight flight; + /** Flight data for this PaymentIntent. */ + @SerializedName("flight_data") + Object flightData; + /** Lodging reservation details for this PaymentIntent. */ @SerializedName("lodging") Lodging lodging; + /** Lodging data for this PaymentIntent. */ + @SerializedName("lodging_data") + Object lodgingData; + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -357,19 +369,25 @@ public static class PaymentDetails { private PaymentDetails( CarRental carRental, + Object carRentalData, Object customerReference, EventDetails eventDetails, Map extraParams, Flight flight, + Object flightData, Lodging lodging, + Object lodgingData, Object orderReference, Subscription subscription) { this.carRental = carRental; + this.carRentalData = carRentalData; this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; this.flight = flight; + this.flightData = flightData; this.lodging = lodging; + this.lodgingData = lodgingData; this.orderReference = orderReference; this.subscription = subscription; } @@ -381,6 +399,8 @@ public static Builder builder() { public static class Builder { private CarRental carRental; + private Object carRentalData; + private Object customerReference; private EventDetails eventDetails; @@ -389,8 +409,12 @@ public static class Builder { private Flight flight; + private Object flightData; + private Lodging lodging; + private Object lodgingData; + private Object orderReference; private Subscription subscription; @@ -399,11 +423,14 @@ public static class Builder { public ChargeCaptureParams.PaymentDetails build() { return new ChargeCaptureParams.PaymentDetails( this.carRental, + this.carRentalData, this.customerReference, this.eventDetails, this.extraParams, this.flight, + this.flightData, this.lodging, + this.lodgingData, this.orderReference, this.subscription); } @@ -414,6 +441,49 @@ public Builder setCarRental(ChargeCaptureParams.PaymentDetails.CarRental carRent return this; } + /** + * Add an element to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCarRentalData(ChargeCaptureParams.PaymentDetails.CarRentalData element) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = new ArrayList(); + } + ((List) this.carRentalData).add(element); + return this; + } + + /** + * Add all elements to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCarRentalData( + List elements) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = new ArrayList(); + } + ((List) this.carRentalData) + .addAll(elements); + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData(EmptyParam carRentalData) { + this.carRentalData = carRentalData; + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData( + List carRentalData) { + this.carRentalData = carRentalData; + return this; + } + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -474,12 +544,95 @@ public Builder setFlight(ChargeCaptureParams.PaymentDetails.Flight flight) { return this; } + /** + * Add an element to `flightData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFlightData(ChargeCaptureParams.PaymentDetails.FlightData element) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData).add(element); + return this; + } + + /** + * Add all elements to `flightData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFlightData( + List elements) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData).addAll(elements); + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData(EmptyParam flightData) { + this.flightData = flightData; + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData(List flightData) { + this.flightData = flightData; + return this; + } + /** Lodging reservation details for this PaymentIntent. */ public Builder setLodging(ChargeCaptureParams.PaymentDetails.Lodging lodging) { this.lodging = lodging; return this; } + /** + * Add an element to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLodgingData(ChargeCaptureParams.PaymentDetails.LodgingData element) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData).add(element); + return this; + } + + /** + * Add all elements to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLodgingData( + List elements) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData).addAll(elements); + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData(EmptyParam lodgingData) { + this.lodgingData = lodgingData; + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData( + List lodgingData) { + this.lodgingData = lodgingData; + return this; + } + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -1849,30 +2002,38 @@ public enum RateInterval implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - 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. */ + public static class CarRentalData { + /** Affiliate (such as travel agency) details for the rental. */ @SerializedName("affiliate") Affiliate affiliate; - /** The name of the company. */ - @SerializedName("company") - String company; + /** Booking confirmation number for the car rental. */ + @SerializedName("booking_number") + String bookingNumber; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** Name of the car rental company. */ + @SerializedName("carrier_name") + String carrierName; - /** Event end time. Measured in seconds since the Unix epoch. */ - @SerializedName("ends_at") - Long endsAt; + /** Customer service phone number for the car rental company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** Number of days the car is being rented. */ + @SerializedName("days_rented") + Long daysRented; + + /** Distance details for the rental. */ + @SerializedName("distance") + Distance distance; + + /** List of drivers for the rental. */ + @SerializedName("drivers") + List drivers; + + /** Required. Drop-off location details. */ + @SerializedName("drop_off") + DropOff dropOff; /** * Map of extra parameters for custom features not available in this client library. The @@ -1883,39 +2044,61 @@ public static class EventDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Type of the event entertainment (concert, sports event etc). */ - @SerializedName("genre") - String genre; + /** Insurance details for the rental. */ + @SerializedName("insurances") + List insurances; - /** Required. The name of the event. */ - @SerializedName("name") - String name; + /** Indicates if the customer was a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; - /** Event start time. Measured in seconds since the Unix epoch. */ - @SerializedName("starts_at") - Long startsAt; + /** Required. Pickup location details. */ + @SerializedName("pickup") + Pickup pickup; - private EventDetails( - Boolean accessControlledVenue, - Address address, + /** Name of the person renting the vehicle. */ + @SerializedName("renter_name") + String renterName; + + /** Required. Total cost breakdown for the rental. */ + @SerializedName("total") + Total total; + + /** Vehicle details for the rental. */ + @SerializedName("vehicle") + Vehicle vehicle; + + private CarRentalData( Affiliate affiliate, - String company, - Delivery delivery, - Long endsAt, + String bookingNumber, + String carrierName, + String customerServicePhoneNumber, + Long daysRented, + Distance distance, + List drivers, + DropOff dropOff, Map extraParams, - String genre, - String name, - Long startsAt) { - this.accessControlledVenue = accessControlledVenue; - this.address = address; + List insurances, + Boolean noShowIndicator, + Pickup pickup, + String renterName, + Total total, + Vehicle vehicle) { this.affiliate = affiliate; - this.company = company; - this.delivery = delivery; - this.endsAt = endsAt; + this.bookingNumber = bookingNumber; + this.carrierName = carrierName; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.daysRented = daysRented; + this.distance = distance; + this.drivers = drivers; + this.dropOff = dropOff; this.extraParams = extraParams; - this.genre = genre; - this.name = name; - this.startsAt = startsAt; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.pickup = pickup; + this.renterName = renterName; + this.total = total; + this.vehicle = vehicle; } public static Builder builder() { @@ -1923,83 +2106,132 @@ public static Builder builder() { } public static class Builder { - private Boolean accessControlledVenue; + private Affiliate affiliate; - private Address address; + private String bookingNumber; - private Affiliate affiliate; + private String carrierName; - private String company; + private String customerServicePhoneNumber; - private Delivery delivery; + private Long daysRented; - private Long endsAt; + private Distance distance; + + private List drivers; + + private DropOff dropOff; private Map extraParams; - private String genre; + private List insurances; - private String name; + private Boolean noShowIndicator; - private Long startsAt; + private Pickup pickup; + + private String renterName; + + private Total total; + + private Vehicle vehicle; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.EventDetails build() { - return new ChargeCaptureParams.PaymentDetails.EventDetails( - this.accessControlledVenue, - this.address, + public ChargeCaptureParams.PaymentDetails.CarRentalData build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData( this.affiliate, - this.company, - this.delivery, - this.endsAt, + this.bookingNumber, + this.carrierName, + this.customerServicePhoneNumber, + this.daysRented, + this.distance, + this.drivers, + this.dropOff, this.extraParams, - this.genre, - this.name, - this.startsAt); + this.insurances, + this.noShowIndicator, + this.pickup, + this.renterName, + this.total, + this.vehicle); } - /** Indicates if the tickets are digitally checked when entering the venue. */ - public Builder setAccessControlledVenue(Boolean accessControlledVenue) { - this.accessControlledVenue = accessControlledVenue; + /** Affiliate (such as travel agency) details for the rental. */ + public Builder setAffiliate( + ChargeCaptureParams.PaymentDetails.CarRentalData.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - /** The event location's address. */ - public Builder setAddress(ChargeCaptureParams.PaymentDetails.EventDetails.Address address) { - this.address = address; + /** Booking confirmation number for the car rental. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - ChargeCaptureParams.PaymentDetails.EventDetails.Affiliate affiliate) { - this.affiliate = affiliate; + /** Name of the car rental company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; return this; } - /** The name of the company. */ - public Builder setCompany(String company) { - this.company = company; + /** Customer service phone number for the car rental company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; return this; } - /** Delivery details for this purchase. */ - public Builder setDelivery( - ChargeCaptureParams.PaymentDetails.EventDetails.Delivery delivery) { - this.delivery = delivery; + /** Number of days the car is being rented. */ + public Builder setDaysRented(Long daysRented) { + this.daysRented = daysRented; return this; } - /** Event end time. Measured in seconds since the Unix epoch. */ - public Builder setEndsAt(Long endsAt) { - this.endsAt = endsAt; + /** Distance details for the rental. */ + public Builder setDistance( + ChargeCaptureParams.PaymentDetails.CarRentalData.Distance distance) { + this.distance = distance; + 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 + * ChargeCaptureParams.PaymentDetails.CarRentalData#drivers} for the field documentation. + */ + public Builder addDriver(ChargeCaptureParams.PaymentDetails.CarRentalData.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 + * ChargeCaptureParams.PaymentDetails.CarRentalData#drivers} for the field documentation. + */ + public Builder addAllDriver( + List elements) { + if (this.drivers == null) { + this.drivers = new ArrayList<>(); + } + this.drivers.addAll(elements); + return this; + } + + /** Required. Drop-off location details. */ + public Builder setDropOff( + ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff dropOff) { + this.dropOff = dropOff; 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 ChargeCaptureParams.PaymentDetails.EventDetails#extraParams} for the + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2013,7 +2245,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.EventDetails#extraParams} for the + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2024,38 +2256,72 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Type of the event entertainment (concert, sports event etc). */ - public Builder setGenre(String genre) { - this.genre = genre; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData#insurances} for the field documentation. + */ + public Builder addInsurance( + ChargeCaptureParams.PaymentDetails.CarRentalData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** Required. The name of the event. */ - public Builder setName(String name) { - this.name = name; + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData#insurances} for the field documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); return this; } - /** Event start time. Measured in seconds since the Unix epoch. */ - public Builder setStartsAt(Long startsAt) { - this.startsAt = startsAt; + /** Indicates if the customer was a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + /** Required. Pickup location details. */ + public Builder setPickup(ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup pickup) { + this.pickup = pickup; + return this; + } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + /** Name of the person renting the vehicle. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total cost breakdown for the rental. */ + public Builder setTotal(ChargeCaptureParams.PaymentDetails.CarRentalData.Total total) { + this.total = total; + return this; + } + + /** Vehicle details for the rental. */ + public Builder setVehicle( + ChargeCaptureParams.PaymentDetails.CarRentalData.Vehicle vehicle) { + this.vehicle = vehicle; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; /** * Map of extra parameters for custom features not available in this client library. The @@ -2067,37 +2333,14 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the 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; + /** Name of affiliate partner. */ + @SerializedName("name") + String name; - private Address( - String city, - String country, - Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + private Affiliate(String code, Map extraParams, String name) { + this.code = code; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.name = name; } public static Builder builder() { @@ -2105,51 +2348,28 @@ public static Builder builder() { } public static class Builder { - private String city; - - private String country; + private String code; private Map extraParams; - private String line1; - - private String line2; - - private String postalCode; - - private String state; + private String name; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.EventDetails.Address build() { - return new ChargeCaptureParams.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; + public ChargeCaptureParams.PaymentDetails.CarRentalData.Affiliate build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Affiliate( + this.code, this.extraParams, this.name); } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; 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 ChargeCaptureParams.PaymentDetails.EventDetails.Address#extraParams} + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Affiliate#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2163,7 +2383,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.EventDetails.Address#extraParams} + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Affiliate#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2174,27 +2394,9 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } - - /** Address line 2, such as the 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; + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; return this; } } @@ -2202,7 +2404,11 @@ public Builder setState(String state) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Distance { + /** Required. Distance traveled. */ + @SerializedName("amount") + Long amount; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2213,13 +2419,17 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + @SerializedName("unit") + Unit unit; - private Affiliate(Map extraParams, String name) { + private Distance(Long amount, Map extraParams, Unit unit) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; + this.unit = unit; } public static Builder builder() { @@ -2227,20 +2437,28 @@ public static Builder builder() { } public static class Builder { + private Long amount; + private Map extraParams; - private String name; + private Unit unit; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.EventDetails.Affiliate build() { - return new ChargeCaptureParams.PaymentDetails.EventDetails.Affiliate( - this.extraParams, this.name); + public ChargeCaptureParams.PaymentDetails.CarRentalData.Distance build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Distance( + this.amount, this.extraParams, this.unit); + } + + /** Required. Distance traveled. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 ChargeCaptureParams.PaymentDetails.EventDetails.Affiliate#extraParams} + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Distance#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2254,7 +2472,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.EventDetails.Affiliate#extraParams} + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Distance#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2265,17 +2483,48 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + public Builder setUnit( + ChargeCaptureParams.PaymentDetails.CarRentalData.Distance.Unit unit) { + this.unit = unit; return this; } } + + public enum Unit implements ApiRequestParams.EnumParam { + @SerializedName("kilometers") + KILOMETERS("kilometers"), + + @SerializedName("miles") + MILES("miles"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Unit(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Driver { + /** Driver's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Driver's identification number. */ + @SerializedName("driver_identification_number") + String driverIdentificationNumber; + + /** Driver's tax number. */ + @SerializedName("driver_tax_number") + String driverTaxNumber; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2286,18 +2535,21 @@ public static class Delivery { @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; + /** Required. Driver's full name. */ + @SerializedName("name") + String name; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Driver( + DateOfBirth dateOfBirth, + String driverIdentificationNumber, + String driverTaxNumber, + Map extraParams, + String name) { + this.dateOfBirth = dateOfBirth; + this.driverIdentificationNumber = driverIdentificationNumber; + this.driverTaxNumber = driverTaxNumber; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.name = name; } public static Builder builder() { @@ -2305,22 +2557,49 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; + private DateOfBirth dateOfBirth; - private Mode mode; + private String driverIdentificationNumber; - private Recipient recipient; + private String driverTaxNumber; + + private Map extraParams; + + private String name; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.EventDetails.Delivery build() { - return new ChargeCaptureParams.PaymentDetails.EventDetails.Delivery( - this.extraParams, this.mode, this.recipient); + public ChargeCaptureParams.PaymentDetails.CarRentalData.Driver build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Driver( + this.dateOfBirth, + this.driverIdentificationNumber, + this.driverTaxNumber, + this.extraParams, + this.name); + } + + /** Driver's date of birth. */ + public Builder setDateOfBirth( + ChargeCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Driver's identification number. */ + public Builder setDriverIdentificationNumber(String driverIdentificationNumber) { + this.driverIdentificationNumber = driverIdentificationNumber; + return this; + } + + /** Driver's tax number. */ + public Builder setDriverTaxNumber(String driverTaxNumber) { + this.driverTaxNumber = driverTaxNumber; + 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 ChargeCaptureParams.PaymentDetails.EventDetails.Delivery#extraParams} + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Driver#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2334,7 +2613,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.EventDetails.Delivery#extraParams} + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Driver#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2345,27 +2624,19 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Mode mode) { - this.mode = mode; - return this; - } - - /** Details of the recipient. */ - public Builder setRecipient( - ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Driver's full name. */ + public Builder setName(String name) { + this.name = name; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class DateOfBirth { + /** Required. Day of birth (1-31). */ + @SerializedName("day") + Long day; /** * Map of extra parameters for custom features not available in this client library. The @@ -2377,20 +2648,19 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + /** Required. Month of birth (1-12). */ + @SerializedName("month") + Long month; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + /** Required. Year of birth (must be greater than 1900). */ + @SerializedName("year") + Long year; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.month = month; + this.year = year; } public static Builder builder() { @@ -2398,23 +2668,23 @@ public static Builder builder() { } public static class Builder { - private String email; + private Long day; private Map extraParams; - private String name; + private Long month; - private String phone; + private Long year; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient build() { - return new ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + public ChargeCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth( + this.day, this.extraParams, this.month, this.year); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. Day of birth (1-31). */ + public Builder setDay(Long day) { + this.day = day; return this; } @@ -2422,7 +2692,7 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} for + * ChargeCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2437,7 +2707,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} for + * ChargeCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2448,279 +2718,297 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** Required. Month of birth (1-12). */ + public Builder setMonth(Long month) { + this.month = month; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Required. Year of birth (must be greater than 1900). */ + public Builder setYear(Long year) { + this.year = year; return this; } } } + } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DropOff { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; - @SerializedName("phone") - PHONE("phone"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Location name. */ + @SerializedName("location_name") + String locationName; - @SerializedName("post") - POST("post"); + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - @Getter(onMethod_ = {@Override}) - private final String value; + private DropOff( + Address address, Map extraParams, String locationName, Long time) { + this.address = address; + this.extraParams = extraParams; + this.locationName = locationName; + this.time = time; + } - Mode(String value) { - this.value = value; - } + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Flight { - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + public static class Builder { + private Address address; - /** - * 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; + private Map extraParams; - /** - * The International Air Transport Association (IATA) carrier code of the carrier that issued - * the ticket. - */ - @SerializedName("carrier") - String carrier; + private String locationName; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + private Long time; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff( + this.address, this.extraParams, this.locationName, this.time); + } - /** The name of the person or entity on the reservation. */ - @SerializedName("passenger_name") - String passengerName; + /** Required. Address of the rental location. */ + public Builder setAddress( + ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff.Address address) { + this.address = address; + return this; + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Required. The individual flight segments associated with the trip. */ - @SerializedName("segments") - List segments; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff#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 ticket number associated with the travel reservation. */ - @SerializedName("ticket_number") - String ticketNumber; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; + return this; + } - 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; - } + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; + return this; + } + } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - public static class Builder { - private Affiliate affiliate; + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - private String agencyNumber; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 String carrier; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - private Delivery delivery; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Map extraParams; + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; - private String passengerName; + /** 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; + } - private List passengers; + public static Builder builder() { + return new Builder(); + } - private List segments; + public static class Builder { + private String city; - private String ticketNumber; + private String country; - /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Flight build() { - return new ChargeCaptureParams.PaymentDetails.Flight( - this.affiliate, - this.agencyNumber, - this.carrier, - this.delivery, - this.extraParams, - this.passengerName, - this.passengers, - this.segments, - this.ticketNumber); - } + private Map extraParams; - /** Affiliate details for this purchase. */ - public Builder setAffiliate(ChargeCaptureParams.PaymentDetails.Flight.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + private String line1; - /** - * 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; - } + private String line2; - /** - * 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; - } + private String postalCode; - /** Delivery details for this purchase. */ - public Builder setDelivery(ChargeCaptureParams.PaymentDetails.Flight.Delivery delivery) { - this.delivery = delivery; - return this; - } + private String state; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.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; - } + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff.Address build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.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; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** The name of the person or entity on the reservation. */ - public Builder setPassengerName(String passengerName) { - this.passengerName = passengerName; - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + 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 - * ChargeCaptureParams.PaymentDetails.Flight#passengers} for the field documentation. - */ - public Builder addPassenger(ChargeCaptureParams.PaymentDetails.Flight.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.add(element); - 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 + * ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff.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 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 - * ChargeCaptureParams.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 all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.DropOff.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; + } - /** - * 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 - * ChargeCaptureParams.PaymentDetails.Flight#segments} for the field documentation. - */ - public Builder addSegment(ChargeCaptureParams.PaymentDetails.Flight.Segment element) { - if (this.segments == null) { - this.segments = new ArrayList<>(); - } - this.segments.add(element); - return this; - } + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + 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 - * ChargeCaptureParams.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; - } + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - /** The ticket number associated with the travel reservation. */ - public Builder setTicketNumber(String ticketNumber) { - this.ticketNumber = ticketNumber; - return this; + /** Required. 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 @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Insurance { + /** Required. Amount of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2731,13 +3019,25 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - private Affiliate(Map extraParams, String name) { + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.name = name; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { @@ -2745,21 +3045,43 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private String currency; + private Map extraParams; - private String name; + private String insuranceCompanyName; + + private InsuranceType insuranceType; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Flight.Affiliate build() { - return new ChargeCaptureParams.PaymentDetails.Flight.Affiliate( - this.extraParams, this.name); + public ChargeCaptureParams.PaymentDetails.CarRentalData.Insurance build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Amount of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Flight.Affiliate#extraParams} for - * the field documentation. + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Insurance#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -2772,8 +3094,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Flight.Affiliate#extraParams} for - * the field documentation. + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Insurance#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -2783,17 +3105,56 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + ChargeCaptureParams.PaymentDetails.CarRentalData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; return this; } } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("liability_supplement") + LIABILITY_SUPPLEMENT("liability_supplement"), + + @SerializedName("loss_damage_waiver") + LOSS_DAMAGE_WAIVER("loss_damage_waiver"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_damage_waiver") + PARTIAL_DAMAGE_WAIVER("partial_damage_waiver"), + + @SerializedName("personal_accident") + PERSONAL_ACCIDENT("personal_accident"), + + @SerializedName("personal_effects") + PERSONAL_EFFECTS("personal_effects"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Pickup { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2804,18 +3165,20 @@ public static class Delivery { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** Location name. */ + @SerializedName("location_name") + String locationName; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Pickup( + Address address, Map extraParams, String locationName, Long time) { + this.address = address; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.locationName = locationName; + this.time = time; } public static Builder builder() { @@ -2823,23 +3186,32 @@ public static Builder builder() { } public static class Builder { + private Address address; + private Map extraParams; - private Mode mode; + private String locationName; - private Recipient recipient; + private Long time; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Flight.Delivery build() { - return new ChargeCaptureParams.PaymentDetails.Flight.Delivery( - this.extraParams, this.mode, this.recipient); + public ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup( + this.address, this.extraParams, this.locationName, this.time); + } + + /** Required. Address of the rental location. */ + public Builder setAddress( + ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup.Address address) { + this.address = address; + 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 ChargeCaptureParams.PaymentDetails.Flight.Delivery#extraParams} for the - * field documentation. + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -2852,8 +3224,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Flight.Delivery#extraParams} for the - * field documentation. + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -2863,26 +3235,32 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode(ChargeCaptureParams.PaymentDetails.Flight.Delivery.Mode mode) { - this.mode = mode; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; return this; } - /** Details of the recipient. */ - public Builder setRecipient( - ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. 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 @@ -2894,20 +3272,39 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + /** Required. 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.name = name; - this.phone = phone; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } public static Builder builder() { @@ -2915,23 +3312,44 @@ public static Builder builder() { } public static class Builder { - private String email; + private String city; + + private String country; private Map extraParams; - private String name; + private String line1; - private String phone; + private String line2; + + private String postalCode; + + private String state; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient build() { - return new ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + public ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup.Address build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; return this; } @@ -2939,7 +3357,7 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2954,7 +3372,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2965,156 +3383,54 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Required. 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 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 - @EqualsAndHashCode(callSuper = false) - 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 ChargeCaptureParams.PaymentDetails.Flight.Passenger build() { - return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 @EqualsAndHashCode(callSuper = false) - public static class Segment { - /** The flight segment amount. */ + public static class Total { + /** Required. Total amount in cents. */ @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; + /** Currency of the amount. */ + @SerializedName("currency") + String currency; - /** - * Required. The departure time for the flight segment. Measured in seconds - * since the Unix epoch. - */ - @SerializedName("departs_at") - Long departsAt; + /** Discount details for the rental. */ + @SerializedName("discounts") + Discounts discounts; - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - @SerializedName("departure_airport") - String departureAirport; + /** Additional charges for the rental. */ + @SerializedName("extra_charges") + List extraCharges; /** * Map of extra parameters for custom features not available in this client library. The @@ -3126,33 +3442,35 @@ public static class Segment { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The flight number associated with the segment. */ - @SerializedName("flight_number") - String flightNumber; + /** Rate per unit for the rental. */ + @SerializedName("rate_per_unit") + Long ratePerUnit; - /** The fare class for the segment. */ - @SerializedName("service_class") - ServiceClass serviceClass; + /** Unit of measurement for the rate. */ + @SerializedName("rate_unit") + RateUnit rateUnit; - private Segment( + /** Tax breakdown for the rental. */ + @SerializedName("tax") + Tax tax; + + private Total( Long amount, - String arrivalAirport, - Long arrivesAt, - String carrier, - Long departsAt, - String departureAirport, + String currency, + Discounts discounts, + List extraCharges, Map extraParams, - String flightNumber, - ServiceClass serviceClass) { + Long ratePerUnit, + RateUnit rateUnit, + Tax tax) { this.amount = amount; - this.arrivalAirport = arrivalAirport; - this.arrivesAt = arrivesAt; - this.carrier = carrier; - this.departsAt = departsAt; - this.departureAirport = departureAirport; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.flightNumber = flightNumber; - this.serviceClass = serviceClass; + this.ratePerUnit = ratePerUnit; + this.rateUnit = rateUnit; + this.tax = tax; } public static Builder builder() { @@ -3162,89 +3480,88 @@ public static Builder builder() { public static class Builder { private Long amount; - private String arrivalAirport; - - private Long arrivesAt; - - private String carrier; + private String currency; - private Long departsAt; + private Discounts discounts; - private String departureAirport; + private List + extraCharges; private Map extraParams; - private String flightNumber; + private Long ratePerUnit; - private ServiceClass serviceClass; + private RateUnit rateUnit; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Flight.Segment build() { - return new ChargeCaptureParams.PaymentDetails.Flight.Segment( + public ChargeCaptureParams.PaymentDetails.CarRentalData.Total build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total( this.amount, - this.arrivalAirport, - this.arrivesAt, - this.carrier, - this.departsAt, - this.departureAirport, + this.currency, + this.discounts, + this.extraCharges, this.extraParams, - this.flightNumber, - this.serviceClass); + this.ratePerUnit, + this.rateUnit, + this.tax); } - /** The flight segment amount. */ + /** Required. Total amount in cents. */ 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; + /** Currency of the amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; 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; + /** Discount details for the rental. */ + public Builder setDiscounts( + ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Discounts discounts) { + this.discounts = discounts; return this; } /** - * Required. The departure time for the flight segment. Measured in - * seconds since the Unix epoch. + * 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 + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total#extraCharges} for the field + * documentation. */ - public Builder setDepartsAt(Long departsAt) { - this.departsAt = departsAt; + public Builder addExtraCharge( + ChargeCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge element) { + if (this.extraCharges == null) { + this.extraCharges = new ArrayList<>(); + } + this.extraCharges.add(element); return this; } /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. + * 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 ChargeCaptureParams.PaymentDetails.CarRentalData.Total#extraCharges} for the + * field documentation. */ - public Builder setDepartureAirport(String departureAirport) { - this.departureAirport = departureAirport; + 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 ChargeCaptureParams.PaymentDetails.Flight.Segment#extraParams} for the - * field documentation. + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Total#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -3257,8 +3574,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Flight.Segment#extraParams} for the - * field documentation. + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Total#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -3268,491 +3585,6053 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The flight number associated with the segment. */ - public Builder setFlightNumber(String flightNumber) { - this.flightNumber = flightNumber; + /** Rate per unit for the rental. */ + public Builder setRatePerUnit(Long ratePerUnit) { + this.ratePerUnit = ratePerUnit; return this; } - /** The fare class for the segment. */ - public Builder setServiceClass( - ChargeCaptureParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { - this.serviceClass = serviceClass; + /** Unit of measurement for the rate. */ + public Builder setRateUnit( + ChargeCaptureParams.PaymentDetails.CarRentalData.Total.RateUnit rateUnit) { + this.rateUnit = rateUnit; return this; } - } - public enum ServiceClass implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), + /** Tax breakdown for the rental. */ + public Builder setTax(ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax tax) { + this.tax = tax; + return this; + } + } - @SerializedName("economy") - ECONOMY("economy"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - @SerializedName("first") - FIRST("first"), + /** Coupon code applied to the rental. */ + @SerializedName("coupon") + String coupon; - @SerializedName("premium_economy") - PREMIUM_ECONOMY("premium_economy"); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Maximum number of free miles or kilometers included. */ + @SerializedName("maximum_free_miles_or_kilometers") + Long maximumFreeMilesOrKilometers; + + private Discounts( + String corporateClientCode, + String coupon, + Map extraParams, + Long maximumFreeMilesOrKilometers) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + } - ServiceClass(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Lodging { - /** The lodging location's address. */ - @SerializedName("address") - Address address; + public static class Builder { + private String corporateClientCode; - /** The number of adults on the booking. */ - @SerializedName("adults") - Long adults; + private String coupon; - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; - - /** The booking number associated with the lodging reservation. */ - @SerializedName("booking_number") - String bookingNumber; + private Map extraParams; - /** The lodging category. */ - @SerializedName("category") - Category category; + private Long maximumFreeMilesOrKilometers; - /** - * Required. Lodging check-in time. Measured in seconds since the Unix epoch. - */ - @SerializedName("checkin_at") - Long checkinAt; + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Discounts build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Discounts( + this.corporateClientCode, + this.coupon, + this.extraParams, + this.maximumFreeMilesOrKilometers); + } - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - @SerializedName("checkout_at") - Long checkoutAt; + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - /** The customer service phone number of the lodging company. */ - @SerializedName("customer_service_phone_number") - String customerServicePhoneNumber; + /** Coupon code applied to the rental. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } - /** The daily lodging room rate. */ - @SerializedName("daily_room_rate_amount") - Long dailyRoomRateAmount; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** List of additional charges being billed. */ - @SerializedName("extra_charges") - List extraCharges; + /** Maximum number of free miles or kilometers included. */ + public Builder setMaximumFreeMilesOrKilometers(Long maximumFreeMilesOrKilometers) { + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + return this; + } + } + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Required. Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; - /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ - @SerializedName("fire_safety_act_compliance") - Boolean fireSafetyActCompliance; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 lodging location. */ - @SerializedName("name") - String name; + /** Required. Type of extra charge. */ + @SerializedName("type") + Type type; - /** - * Indicates if the customer did not keep their booking while failing to cancel the - * reservation. - */ - @SerializedName("no_show") - Boolean noShow; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } - /** The number of rooms on the booking. */ - @SerializedName("number_of_rooms") - Long numberOfRooms; + public static Builder builder() { + return new Builder(); + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + public static class Builder { + private Long amount; - /** The phone number of the lodging location. */ - @SerializedName("property_phone_number") - String propertyPhoneNumber; + private Map extraParams; - /** The room class for this purchase. */ - @SerializedName("room_class") - String roomClass; + private Type type; - /** The number of room nights. */ - @SerializedName("room_nights") - Long roomNights; + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } - /** The total tax amount associating with the room reservation. */ - @SerializedName("total_room_tax_amount") - Long totalRoomTaxAmount; + /** Required. Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** The total tax amount. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - 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; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Required. Type of extra charge. */ + public Builder setType( + ChargeCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } + } - public static class Builder { - private Address address; + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("extra_mileage") + EXTRA_MILEAGE("extra_mileage"), - private Long adults; + @SerializedName("gas") + GAS("gas"), - private Affiliate affiliate; + @SerializedName("gps") + GPS("gps"), - private String bookingNumber; + @SerializedName("late_charge") + LATE_CHARGE("late_charge"), - private Category category; + @SerializedName("one_way_drop_off") + ONE_WAY_DROP_OFF("one_way_drop_off"), - private Long checkinAt; + @SerializedName("other") + OTHER("other"), - private Long checkoutAt; + @SerializedName("parking") + PARKING("parking"), - private String customerServicePhoneNumber; + @SerializedName("phone") + PHONE("phone"), - private Long dailyRoomRateAmount; + @SerializedName("regular_mileage") + REGULAR_MILEAGE("regular_mileage"), - private Delivery delivery; + @SerializedName("towing") + TOWING("towing"); - private List extraCharges; + @Getter(onMethod_ = {@Override}) + private final String value; - private Map extraParams; + Type(String value) { + this.value = value; + } + } + } - private Boolean fireSafetyActCompliance; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 String name; + /** Indicates if the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - private Boolean noShow; + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; - private Long numberOfRooms; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - private List passengers; + public static Builder builder() { + return new Builder(); + } - private String propertyPhoneNumber; + public static class Builder { + private Map extraParams; - private String roomClass; + private Boolean taxExemptIndicator; - private Long roomNights; + private List taxes; - private Long totalRoomTaxAmount; + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - private Long totalTaxAmount; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Lodging build() { - return new ChargeCaptureParams.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); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.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; + } - /** The lodging location's address. */ - public Builder setAddress(ChargeCaptureParams.PaymentDetails.Lodging.Address address) { - this.address = address; - return this; - } + /** Indicates if the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } - /** The number of adults on the booking. */ - public Builder setAdults(Long adults) { - this.adults = adults; - return this; - } + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - ChargeCaptureParams.PaymentDetails.Lodging.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } - /** The booking number associated with the lodging reservation. */ - public Builder setBookingNumber(String bookingNumber) { - this.bookingNumber = bookingNumber; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; - /** The lodging category. */ - public Builder setCategory(ChargeCaptureParams.PaymentDetails.Lodging.Category category) { - this.category = category; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Tax rate applied. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + String type; + + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - /** - * Required. Lodging check-in time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckinAt(Long checkinAt) { - this.checkinAt = checkinAt; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckoutAt(Long checkoutAt) { - this.checkoutAt = checkoutAt; - return this; - } + public static class Builder { + private Long amount; - /** The customer service phone number of the lodging company. */ - public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { - this.customerServicePhoneNumber = customerServicePhoneNumber; - return this; - } + private Map extraParams; - /** The daily lodging room rate. */ - public Builder setDailyRoomRateAmount(Long dailyRoomRateAmount) { - this.dailyRoomRateAmount = dailyRoomRateAmount; - return this; - } + private Long rate; - /** Delivery details for this purchase. */ - public Builder setDelivery(ChargeCaptureParams.PaymentDetails.Lodging.Delivery delivery) { - this.delivery = delivery; - return this; - } + private String type; - /** - * 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 - * ChargeCaptureParams.PaymentDetails.Lodging#extraCharges} for the field documentation. - */ - public Builder addExtraCharge( - ChargeCaptureParams.PaymentDetails.Lodging.ExtraCharge element) { - if (this.extraCharges == null) { - this.extraCharges = new ArrayList<>(); - } - this.extraCharges.add(element); - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - /** - * 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 - * ChargeCaptureParams.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; - } + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 ChargeCaptureParams.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 a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.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 ChargeCaptureParams.PaymentDetails.Lodging#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.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; + } + + /** Tax rate applied. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } } - 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; - } + public enum RateUnit implements ApiRequestParams.EnumParam { + @SerializedName("days") + DAYS("days"), - /** The name of the lodging location. */ - public Builder setName(String name) { - this.name = name; - return this; - } + @SerializedName("kilometers") + KILOMETERS("kilometers"), - /** - * 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; - } + @SerializedName("miles") + MILES("miles"), - /** The number of rooms on the booking. */ - public Builder setNumberOfRooms(Long numberOfRooms) { - this.numberOfRooms = numberOfRooms; - return this; - } + @SerializedName("months") + MONTHS("months"), - /** - * 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 - * ChargeCaptureParams.PaymentDetails.Lodging#passengers} for the field documentation. - */ - public Builder addPassenger(ChargeCaptureParams.PaymentDetails.Lodging.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); + @SerializedName("weeks") + WEEKS("weeks"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RateUnit(String value) { + this.value = value; } - this.passengers.add(element); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vehicle { /** - * 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 - * ChargeCaptureParams.PaymentDetails.Lodging#passengers} for the field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder addAllPassenger( - List elements) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.addAll(elements); - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** The phone number of the lodging location. */ - public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { - this.propertyPhoneNumber = propertyPhoneNumber; - return this; - } + /** Make of the rental vehicle. */ + @SerializedName("make") + String make; - /** The room class for this purchase. */ - public Builder setRoomClass(String roomClass) { - this.roomClass = roomClass; - return this; - } + /** Model of the rental vehicle. */ + @SerializedName("model") + String model; - /** The number of room nights. */ - public Builder setRoomNights(Long roomNights) { - this.roomNights = roomNights; + /** Odometer reading at the time of rental. */ + @SerializedName("odometer") + Long odometer; + + /** Type of the rental vehicle. */ + @SerializedName("type") + Type type; + + /** Class of the rental vehicle. */ + @SerializedName("vehicle_class") + VehicleClass vehicleClass; + + /** Vehicle identification number (VIN). */ + @SerializedName("vehicle_identification_number") + String vehicleIdentificationNumber; + + private Vehicle( + Map extraParams, + String make, + String model, + Long odometer, + Type type, + VehicleClass vehicleClass, + String vehicleIdentificationNumber) { + this.extraParams = extraParams; + this.make = make; + this.model = model; + this.odometer = odometer; + this.type = type; + this.vehicleClass = vehicleClass; + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String make; + + private String model; + + private Long odometer; + + private Type type; + + private VehicleClass vehicleClass; + + private String vehicleIdentificationNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.CarRentalData.Vehicle build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Vehicle( + this.extraParams, + this.make, + this.model, + this.odometer, + this.type, + this.vehicleClass, + this.vehicleIdentificationNumber); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Vehicle#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.CarRentalData.Vehicle#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Make of the rental vehicle. */ + public Builder setMake(String make) { + this.make = make; + return this; + } + + /** Model of the rental vehicle. */ + public Builder setModel(String model) { + this.model = model; + return this; + } + + /** Odometer reading at the time of rental. */ + public Builder setOdometer(Long odometer) { + this.odometer = odometer; + return this; + } + + /** Type of the rental vehicle. */ + public Builder setType( + ChargeCaptureParams.PaymentDetails.CarRentalData.Vehicle.Type type) { + this.type = type; + return this; + } + + /** Class of the rental vehicle. */ + public Builder setVehicleClass( + ChargeCaptureParams.PaymentDetails.CarRentalData.Vehicle.VehicleClass vehicleClass) { + this.vehicleClass = vehicleClass; + return this; + } + + /** Vehicle identification number (VIN). */ + public Builder setVehicleIdentificationNumber(String vehicleIdentificationNumber) { + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("cargo_van") + CARGO_VAN("cargo_van"), + + @SerializedName("compact") + COMPACT("compact"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("exotic") + EXOTIC("exotic"), + + @SerializedName("exotic_suv") + EXOTIC_SUV("exotic_suv"), + + @SerializedName("fifteen_passenger_van") + FIFTEEN_PASSENGER_VAN("fifteen_passenger_van"), + + @SerializedName("four_wheel_drive") + FOUR_WHEEL_DRIVE("four_wheel_drive"), + + @SerializedName("full_size") + FULL_SIZE("full_size"), + + @SerializedName("intermediate") + INTERMEDIATE("intermediate"), + + @SerializedName("large_suv") + LARGE_SUV("large_suv"), + + @SerializedName("large_truck") + LARGE_TRUCK("large_truck"), + + @SerializedName("luxury") + LUXURY("luxury"), + + @SerializedName("medium_suv") + MEDIUM_SUV("medium_suv"), + + @SerializedName("midsize") + MIDSIZE("midsize"), + + @SerializedName("mini") + MINI("mini"), + + @SerializedName("minivan") + MINIVAN("minivan"), + + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), + + @SerializedName("moped") + MOPED("moped"), + + @SerializedName("moving_van") + MOVING_VAN("moving_van"), + + @SerializedName("premium") + PREMIUM("premium"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("small_medium_truck") + SMALL_MEDIUM_TRUCK("small_medium_truck"), + + @SerializedName("small_suv") + SMALL_SUV("small_suv"), + + @SerializedName("special") + SPECIAL("special"), + + @SerializedName("standard") + STANDARD("standard"), + + @SerializedName("stretch") + STRETCH("stretch"), + + @SerializedName("subcompact") + SUBCOMPACT("subcompact"), + + @SerializedName("taxi") + TAXI("taxi"), + + @SerializedName("twelve_foot_truck") + TWELVE_FOOT_TRUCK("twelve_foot_truck"), + + @SerializedName("twelve_passenger_van") + TWELVE_PASSENGER_VAN("twelve_passenger_van"), + + @SerializedName("twenty_foot_truck") + TWENTY_FOOT_TRUCK("twenty_foot_truck"), + + @SerializedName("twenty_four_foot_truck") + TWENTY_FOUR_FOOT_TRUCK("twenty_four_foot_truck"), + + @SerializedName("twenty_six_foot_truck") + TWENTY_SIX_FOOT_TRUCK("twenty_six_foot_truck"), + + @SerializedName("unique") + UNIQUE("unique"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + + public enum VehicleClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VehicleClass(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.EventDetails build() { + return new ChargeCaptureParams.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 total tax amount associating with the room reservation. */ - public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { - this.totalRoomTaxAmount = totalRoomTaxAmount; + /** The event location's address. */ + public Builder setAddress(ChargeCaptureParams.PaymentDetails.EventDetails.Address address) { + this.address = address; return this; } - /** The total tax amount. */ - public Builder setTotalTaxAmount(Long totalTaxAmount) { - this.totalTaxAmount = totalTaxAmount; - return this; + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + ChargeCaptureParams.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( + ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the 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 ChargeCaptureParams.PaymentDetails.EventDetails.Address build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the 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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.EventDetails.Affiliate build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.EventDetails.Delivery build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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( + ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient build() { + return new ChargeCaptureParams.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 + * ChargeCaptureParams.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 + * ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Flight build() { + return new ChargeCaptureParams.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(ChargeCaptureParams.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(ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 + * ChargeCaptureParams.PaymentDetails.Flight#passengers} for the field documentation. + */ + public Builder addPassenger(ChargeCaptureParams.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 + * ChargeCaptureParams.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 + * ChargeCaptureParams.PaymentDetails.Flight#segments} for the field documentation. + */ + public Builder addSegment(ChargeCaptureParams.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 + * ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Flight.Affiliate build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Flight.Delivery build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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(ChargeCaptureParams.PaymentDetails.Flight.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new ChargeCaptureParams.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 + * ChargeCaptureParams.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 + * ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Flight.Passenger build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Flight.Segment build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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( + ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + public static class FlightData { + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Reservation reference. */ + @SerializedName("booking_number") + String bookingNumber; + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + @SerializedName("computerized_reservation_system") + String computerizedReservationSystem; + + /** Ticket restrictions. */ + @SerializedName("endorsements_and_restrictions") + String endorsementsAndRestrictions; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances. */ + @SerializedName("insurances") + List insurances; + + /** List of passengers. */ + @SerializedName("passengers") + List passengers; + + /** Required. List of flight segments. */ + @SerializedName("segments") + List segments; + + /** Electronic ticket indicator. */ + @SerializedName("ticket_electronically_issued_indicator") + Boolean ticketElectronicallyIssuedIndicator; + + /** Required. Total cost breakdown. */ + @SerializedName("total") + Total total; + + /** Type of flight transaction. */ + @SerializedName("transaction_type") + TransactionType transactionType; + + private FlightData( + Affiliate affiliate, + String bookingNumber, + String computerizedReservationSystem, + String endorsementsAndRestrictions, + Map extraParams, + List insurances, + List passengers, + List segments, + Boolean ticketElectronicallyIssuedIndicator, + Total total, + TransactionType transactionType) { + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.computerizedReservationSystem = computerizedReservationSystem; + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.segments = segments; + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + this.total = total; + this.transactionType = transactionType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Affiliate affiliate; + + private String bookingNumber; + + private String computerizedReservationSystem; + + private String endorsementsAndRestrictions; + + private Map extraParams; + + private List insurances; + + private List passengers; + + private List segments; + + private Boolean ticketElectronicallyIssuedIndicator; + + private Total total; + + private TransactionType transactionType; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData build() { + return new ChargeCaptureParams.PaymentDetails.FlightData( + this.affiliate, + this.bookingNumber, + this.computerizedReservationSystem, + this.endorsementsAndRestrictions, + this.extraParams, + this.insurances, + this.passengers, + this.segments, + this.ticketElectronicallyIssuedIndicator, + this.total, + this.transactionType); + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + ChargeCaptureParams.PaymentDetails.FlightData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Reservation reference. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + public Builder setComputerizedReservationSystem(String computerizedReservationSystem) { + this.computerizedReservationSystem = computerizedReservationSystem; + return this; + } + + /** Ticket restrictions. */ + public Builder setEndorsementsAndRestrictions(String endorsementsAndRestrictions) { + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + 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 ChargeCaptureParams.PaymentDetails.FlightData#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FlightData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData#insurances} for the field documentation. + */ + public Builder addInsurance( + ChargeCaptureParams.PaymentDetails.FlightData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData#insurances} for the field documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * ChargeCaptureParams.PaymentDetails.FlightData#passengers} for the field documentation. + */ + public Builder addPassenger( + ChargeCaptureParams.PaymentDetails.FlightData.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 + * ChargeCaptureParams.PaymentDetails.FlightData#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 + * ChargeCaptureParams.PaymentDetails.FlightData#segments} for the field documentation. + */ + public Builder addSegment(ChargeCaptureParams.PaymentDetails.FlightData.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 + * ChargeCaptureParams.PaymentDetails.FlightData#segments} for the field documentation. + */ + public Builder addAllSegment( + List elements) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.addAll(elements); + return this; + } + + /** Electronic ticket indicator. */ + public Builder setTicketElectronicallyIssuedIndicator( + Boolean ticketElectronicallyIssuedIndicator) { + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + return this; + } + + /** Required. Total cost breakdown. */ + public Builder setTotal(ChargeCaptureParams.PaymentDetails.FlightData.Total total) { + this.total = total; + return this; + } + + /** Type of flight transaction. */ + public Builder setTransactionType( + ChargeCaptureParams.PaymentDetails.FlightData.TransactionType transactionType) { + this.transactionType = transactionType; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of affiliate partner. */ + @SerializedName("name") + String name; + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + @SerializedName("travel_authorization_code") + String travelAuthorizationCode; + + private Affiliate( + String code, + Map extraParams, + String name, + String travelAuthorizationCode) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + this.travelAuthorizationCode = travelAuthorizationCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String code; + + private Map extraParams; + + private String name; + + private String travelAuthorizationCode; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Affiliate build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Affiliate( + this.code, this.extraParams, this.name, this.travelAuthorizationCode); + } + + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + 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 ChargeCaptureParams.PaymentDetails.FlightData.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 ChargeCaptureParams.PaymentDetails.FlightData.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; + } + + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + public Builder setTravelAuthorizationCode(String travelAuthorizationCode) { + this.travelAuthorizationCode = travelAuthorizationCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Insurance cost. */ + @SerializedName("amount") + Long amount; + + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Insurance company name. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Required. Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String currency; + + private Map extraParams; + + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Insurance build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Insurance cost. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FlightData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FlightData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Insurance company name. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance. */ + public Builder setInsuranceType( + ChargeCaptureParams.PaymentDetails.FlightData.Insurance.InsuranceType insuranceType) { + this.insuranceType = insuranceType; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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. Passenger's full name. */ + @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 ChargeCaptureParams.PaymentDetails.FlightData.Passenger build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.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 ChargeCaptureParams.PaymentDetails.FlightData.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 ChargeCaptureParams.PaymentDetails.FlightData.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. Passenger's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Segment { + /** Segment fare amount. */ + @SerializedName("amount") + Long amount; + + /** Required. Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Required. Airline carrier code. */ + @SerializedName("carrier_code") + String carrierCode; + + /** Carrier name. */ + @SerializedName("carrier_name") + String carrierName; + + /** Segment currency. */ + @SerializedName("currency") + String currency; + + /** Required. Departure details. */ + @SerializedName("departure") + Departure departure; + + /** Exchange ticket number. */ + @SerializedName("exchange_ticket_number") + String exchangeTicketNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Fare basis code. */ + @SerializedName("fare_basis_code") + String fareBasisCode; + + /** Additional fees. */ + @SerializedName("fees") + Long fees; + + /** Flight number. */ + @SerializedName("flight_number") + String flightNumber; + + /** Stopover indicator. */ + @SerializedName("is_stop_over_indicator") + Boolean isStopOverIndicator; + + /** Refundable ticket indicator. */ + @SerializedName("refundable") + Boolean refundable; + + /** Required. Class of service. */ + @SerializedName("service_class") + ServiceClass serviceClass; + + /** Tax amount for segment. */ + @SerializedName("tax_amount") + Long taxAmount; + + /** Ticket number. */ + @SerializedName("ticket_number") + String ticketNumber; + + private Segment( + Long amount, + Arrival arrival, + String carrierCode, + String carrierName, + String currency, + Departure departure, + String exchangeTicketNumber, + Map extraParams, + String fareBasisCode, + Long fees, + String flightNumber, + Boolean isStopOverIndicator, + Boolean refundable, + ServiceClass serviceClass, + Long taxAmount, + String ticketNumber) { + this.amount = amount; + this.arrival = arrival; + this.carrierCode = carrierCode; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.exchangeTicketNumber = exchangeTicketNumber; + this.extraParams = extraParams; + this.fareBasisCode = fareBasisCode; + this.fees = fees; + this.flightNumber = flightNumber; + this.isStopOverIndicator = isStopOverIndicator; + this.refundable = refundable; + this.serviceClass = serviceClass; + this.taxAmount = taxAmount; + this.ticketNumber = ticketNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Arrival arrival; + + private String carrierCode; + + private String carrierName; + + private String currency; + + private Departure departure; + + private String exchangeTicketNumber; + + private Map extraParams; + + private String fareBasisCode; + + private Long fees; + + private String flightNumber; + + private Boolean isStopOverIndicator; + + private Boolean refundable; + + private ServiceClass serviceClass; + + private Long taxAmount; + + private String ticketNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Segment build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Segment( + this.amount, + this.arrival, + this.carrierCode, + this.carrierName, + this.currency, + this.departure, + this.exchangeTicketNumber, + this.extraParams, + this.fareBasisCode, + this.fees, + this.flightNumber, + this.isStopOverIndicator, + this.refundable, + this.serviceClass, + this.taxAmount, + this.ticketNumber); + } + + /** Segment fare amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Required. Arrival details. */ + public Builder setArrival( + ChargeCaptureParams.PaymentDetails.FlightData.Segment.Arrival arrival) { + this.arrival = arrival; + return this; + } + + /** Required. Airline carrier code. */ + public Builder setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** Carrier name. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Segment currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Required. Departure details. */ + public Builder setDeparture( + ChargeCaptureParams.PaymentDetails.FlightData.Segment.Departure departure) { + this.departure = departure; + return this; + } + + /** Exchange ticket number. */ + public Builder setExchangeTicketNumber(String exchangeTicketNumber) { + this.exchangeTicketNumber = exchangeTicketNumber; + 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 ChargeCaptureParams.PaymentDetails.FlightData.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 ChargeCaptureParams.PaymentDetails.FlightData.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; + } + + /** Fare basis code. */ + public Builder setFareBasisCode(String fareBasisCode) { + this.fareBasisCode = fareBasisCode; + return this; + } + + /** Additional fees. */ + public Builder setFees(Long fees) { + this.fees = fees; + return this; + } + + /** Flight number. */ + public Builder setFlightNumber(String flightNumber) { + this.flightNumber = flightNumber; + return this; + } + + /** Stopover indicator. */ + public Builder setIsStopOverIndicator(Boolean isStopOverIndicator) { + this.isStopOverIndicator = isStopOverIndicator; + return this; + } + + /** Refundable ticket indicator. */ + public Builder setRefundable(Boolean refundable) { + this.refundable = refundable; + return this; + } + + /** Required. Class of service. */ + public Builder setServiceClass( + ChargeCaptureParams.PaymentDetails.FlightData.Segment.ServiceClass serviceClass) { + this.serviceClass = serviceClass; + return this; + } + + /** Tax amount for segment. */ + public Builder setTaxAmount(Long taxAmount) { + this.taxAmount = taxAmount; + return this; + } + + /** Ticket number. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Required. Arrival airport IATA code. */ + @SerializedName("airport") + String airport; + + /** Arrival date/time. */ + @SerializedName("arrives_at") + Long arrivesAt; + + /** Arrival city. */ + @SerializedName("city") + String city; + + /** Arrival country. */ + @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; + + private Arrival( + String airport, + Long arrivesAt, + String city, + String country, + Map extraParams) { + this.airport = airport; + this.arrivesAt = arrivesAt; + this.city = city; + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String airport; + + private Long arrivesAt; + + private String city; + + private String country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Segment.Arrival build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Segment.Arrival( + this.airport, this.arrivesAt, this.city, this.country, this.extraParams); + } + + /** Required. Arrival airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } + + /** Arrival date/time. */ + public Builder setArrivesAt(Long arrivesAt) { + this.arrivesAt = arrivesAt; + return this; + } + + /** Arrival city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Arrival country. */ + 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 + * ChargeCaptureParams.PaymentDetails.FlightData.Segment.Arrival#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData.Segment.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Required. Departure airport IATA code. */ + @SerializedName("airport") + String airport; + + /** Departure city. */ + @SerializedName("city") + String city; + + /** Departure country. */ + @SerializedName("country") + String country; + + /** Required. Departure date/time. */ + @SerializedName("departs_at") + Long departsAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Departure( + String airport, + String city, + String country, + Long departsAt, + Map extraParams) { + this.airport = airport; + this.city = city; + this.country = country; + this.departsAt = departsAt; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String airport; + + private String city; + + private String country; + + private Long departsAt; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Segment.Departure build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Segment.Departure( + this.airport, this.city, this.country, this.departsAt, this.extraParams); + } + + /** Required. Departure airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } + + /** Departure city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Departure country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** Required. Departure date/time. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + 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 + * ChargeCaptureParams.PaymentDetails.FlightData.Segment.Departure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData.Segment.Departure#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 ServiceClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Total { + /** Required. Total flight amount. */ + @SerializedName("amount") + Long amount; + + /** Reason for credit. */ + @SerializedName("credit_reason") + CreditReason creditReason; + + /** Total currency. */ + @SerializedName("currency") + String currency; + + /** Discount details. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges. */ + @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; + + /** Tax breakdown. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + CreditReason creditReason, + String currency, + Discounts discounts, + List extraCharges, + Map extraParams, + Tax tax) { + this.amount = amount; + this.creditReason = creditReason; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private CreditReason creditReason; + + private String currency; + + private Discounts discounts; + + private List + extraCharges; + + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Total build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Total( + this.amount, + this.creditReason, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.tax); + } + + /** Required. Total flight amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Reason for credit. */ + public Builder setCreditReason( + ChargeCaptureParams.PaymentDetails.FlightData.Total.CreditReason creditReason) { + this.creditReason = creditReason; + return this; + } + + /** Total currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details. */ + public Builder setDiscounts( + ChargeCaptureParams.PaymentDetails.FlightData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * ChargeCaptureParams.PaymentDetails.FlightData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + ChargeCaptureParams.PaymentDetails.FlightData.Total.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 ChargeCaptureParams.PaymentDetails.FlightData.Total#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 ChargeCaptureParams.PaymentDetails.FlightData.Total#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FlightData.Total#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 breakdown. */ + public Builder setTax(ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Discounts(String corporateClientCode, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String corporateClientCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Total.Discounts build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Discounts( + this.corporateClientCode, this.extraParams); + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + 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 + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Discounts#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 + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of additional charges. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 additional charges. */ + @SerializedName("type") + Type type; + + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } + + /** Amount of additional charges. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 + * ChargeCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge#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 additional charges. */ + public Builder setType( + ChargeCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("additional_fees") + ADDITIONAL_FEES("additional_fees"), + + @SerializedName("ancillary_service_charges") + ANCILLARY_SERVICE_CHARGES("ancillary_service_charges"), + + @SerializedName("exchange_fee") + EXCHANGE_FEE("exchange_fee"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; + + private Tax( + Map extraParams, + List taxes) { + this.extraParams = extraParams; + this.taxes = taxes; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List taxes; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax( + this.extraParams, this.taxes); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData.Total.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 + * ChargeCaptureParams.PaymentDetails.FlightData.Total.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; + } + + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } + + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax. */ + @SerializedName("type") + String type; + + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.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 + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.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; + } + + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } + } + + public enum CreditReason implements ApiRequestParams.EnumParam { + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_ticket_refund") + PARTIAL_TICKET_REFUND("partial_ticket_refund"), + + @SerializedName("passenger_transport_ancillary_cancellation") + PASSENGER_TRANSPORT_ANCILLARY_CANCELLATION("passenger_transport_ancillary_cancellation"), + + @SerializedName("ticket_and_ancillary_cancellation") + TICKET_AND_ANCILLARY_CANCELLATION("ticket_and_ancillary_cancellation"), + + @SerializedName("ticket_cancellation") + TICKET_CANCELLATION("ticket_cancellation"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CreditReason(String value) { + this.value = value; + } + } + } + + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("exchange_ticket") + EXCHANGE_TICKET("exchange_ticket"), + + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), + + @SerializedName("refund") + REFUND("refund"), + + @SerializedName("ticket_purchase") + TICKET_PURCHASE("ticket_purchase"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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. Lodging 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 ChargeCaptureParams.PaymentDetails.Lodging build() { + return new ChargeCaptureParams.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(ChargeCaptureParams.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( + ChargeCaptureParams.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(ChargeCaptureParams.PaymentDetails.Lodging.Category category) { + this.category = category; + return this; + } + + /** + * Required. Lodging 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(ChargeCaptureParams.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 + * ChargeCaptureParams.PaymentDetails.Lodging#extraCharges} for the field documentation. + */ + public Builder addExtraCharge( + ChargeCaptureParams.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 + * ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 + * ChargeCaptureParams.PaymentDetails.Lodging#passengers} for the field documentation. + */ + public Builder addPassenger(ChargeCaptureParams.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 + * ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the 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 ChargeCaptureParams.PaymentDetails.Lodging.Address build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the 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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Lodging.Affiliate build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Lodging.Delivery build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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(ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new ChargeCaptureParams.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 + * ChargeCaptureParams.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 + * ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 ChargeCaptureParams.PaymentDetails.Lodging.Passenger build() { + return new ChargeCaptureParams.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 ChargeCaptureParams.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 ChargeCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + public static class LodgingData { + /** Accommodation details for the lodging. */ + @SerializedName("accommodation") + Accommodation accommodation; + + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Booking confirmation number for the lodging. */ + @SerializedName("booking_number") + String bookingNumber; + + /** Required. Check-in date. */ + @SerializedName("checkin_at") + Long checkinAt; + + /** Required. Check-out date. */ + @SerializedName("checkout_at") + Long checkoutAt; + + /** Customer service phone number for the lodging company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + @SerializedName("fire_safety_act_compliance_indicator") + Boolean fireSafetyActComplianceIndicator; + + /** List of guests for the lodging. */ + @SerializedName("guests") + List guests; + + /** Host details for the lodging. */ + @SerializedName("host") + Host host; + + /** List of insurances for the lodging. */ + @SerializedName("insurances") + List insurances; + + /** Whether the renter is a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; + + /** Renter ID number for the lodging. */ + @SerializedName("renter_id_number") + String renterIdNumber; + + /** Renter name for the lodging. */ + @SerializedName("renter_name") + String renterName; + + /** Required. Total details for the lodging. */ + @SerializedName("total") + Total total; + + private LodgingData( + Accommodation accommodation, + Affiliate affiliate, + String bookingNumber, + Long checkinAt, + Long checkoutAt, + String customerServicePhoneNumber, + Map extraParams, + Boolean fireSafetyActComplianceIndicator, + List guests, + Host host, + List insurances, + Boolean noShowIndicator, + String renterIdNumber, + String renterName, + Total total) { + this.accommodation = accommodation; + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.checkinAt = checkinAt; + this.checkoutAt = checkoutAt; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + this.guests = guests; + this.host = host; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.renterIdNumber = renterIdNumber; + this.renterName = renterName; + this.total = total; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Accommodation accommodation; + + private Affiliate affiliate; + + private String bookingNumber; + + private Long checkinAt; + + private Long checkoutAt; + + private String customerServicePhoneNumber; + + private Map extraParams; + + private Boolean fireSafetyActComplianceIndicator; + + private List guests; + + private Host host; + + private List insurances; + + private Boolean noShowIndicator; + + private String renterIdNumber; + + private String renterName; + + private Total total; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.LodgingData build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData( + this.accommodation, + this.affiliate, + this.bookingNumber, + this.checkinAt, + this.checkoutAt, + this.customerServicePhoneNumber, + this.extraParams, + this.fireSafetyActComplianceIndicator, + this.guests, + this.host, + this.insurances, + this.noShowIndicator, + this.renterIdNumber, + this.renterName, + this.total); + } + + /** Accommodation details for the lodging. */ + public Builder setAccommodation( + ChargeCaptureParams.PaymentDetails.LodgingData.Accommodation accommodation) { + this.accommodation = accommodation; + return this; + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + ChargeCaptureParams.PaymentDetails.LodgingData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Booking confirmation number for the lodging. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Required. Check-in date. */ + public Builder setCheckinAt(Long checkinAt) { + this.checkinAt = checkinAt; + return this; + } + + /** Required. Check-out date. */ + public Builder setCheckoutAt(Long checkoutAt) { + this.checkoutAt = checkoutAt; + return this; + } + + /** Customer service phone number for the lodging company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + 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 ChargeCaptureParams.PaymentDetails.LodgingData#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.LodgingData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + public Builder setFireSafetyActComplianceIndicator( + Boolean fireSafetyActComplianceIndicator) { + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + return this; + } + + /** + * Add an element to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData#guests} for the field documentation. + */ + public Builder addGuest(ChargeCaptureParams.PaymentDetails.LodgingData.Guest element) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.add(element); + return this; + } + + /** + * Add all elements to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData#guests} for the field documentation. + */ + public Builder addAllGuest( + List elements) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.addAll(elements); + return this; + } + + /** Host details for the lodging. */ + public Builder setHost(ChargeCaptureParams.PaymentDetails.LodgingData.Host host) { + this.host = host; + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData#insurances} for the field documentation. + */ + public Builder addInsurance( + ChargeCaptureParams.PaymentDetails.LodgingData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData#insurances} for the field documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Whether the renter is a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } + + /** Renter ID number for the lodging. */ + public Builder setRenterIdNumber(String renterIdNumber) { + this.renterIdNumber = renterIdNumber; + return this; + } + + /** Renter name for the lodging. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total details for the lodging. */ + public Builder setTotal(ChargeCaptureParams.PaymentDetails.LodgingData.Total total) { + this.total = total; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Accommodation { + /** Type of accommodation. */ + @SerializedName("accommodation_type") + AccommodationType accommodationType; + + /** Bed type. */ + @SerializedName("bed_type") + String bedType; + + /** Daily accommodation rate in cents. */ + @SerializedName("daily_rate_amount") + Long dailyRateAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Number of nights. */ + @SerializedName("nights") + Long nights; + + /** Number of rooms, cabanas, apartments, and so on. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; + + /** Rate type. */ + @SerializedName("rate_type") + String rateType; + + /** Whether smoking is allowed. */ + @SerializedName("smoking_indicator") + Boolean smokingIndicator; + + private Accommodation( + AccommodationType accommodationType, + String bedType, + Long dailyRateAmount, + Map extraParams, + Long nights, + Long numberOfRooms, + String rateType, + Boolean smokingIndicator) { + this.accommodationType = accommodationType; + this.bedType = bedType; + this.dailyRateAmount = dailyRateAmount; + this.extraParams = extraParams; + this.nights = nights; + this.numberOfRooms = numberOfRooms; + this.rateType = rateType; + this.smokingIndicator = smokingIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AccommodationType accommodationType; + + private String bedType; + + private Long dailyRateAmount; + + private Map extraParams; + + private Long nights; + + private Long numberOfRooms; + + private String rateType; + + private Boolean smokingIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.LodgingData.Accommodation build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Accommodation( + this.accommodationType, + this.bedType, + this.dailyRateAmount, + this.extraParams, + this.nights, + this.numberOfRooms, + this.rateType, + this.smokingIndicator); + } + + /** Type of accommodation. */ + public Builder setAccommodationType( + ChargeCaptureParams.PaymentDetails.LodgingData.Accommodation.AccommodationType + accommodationType) { + this.accommodationType = accommodationType; + return this; + } + + /** Bed type. */ + public Builder setBedType(String bedType) { + this.bedType = bedType; + return this; + } + + /** Daily accommodation rate in cents. */ + public Builder setDailyRateAmount(Long dailyRateAmount) { + this.dailyRateAmount = dailyRateAmount; + 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 + * ChargeCaptureParams.PaymentDetails.LodgingData.Accommodation#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData.Accommodation#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Number of nights. */ + public Builder setNights(Long nights) { + this.nights = nights; + return this; + } + + /** Number of rooms, cabanas, apartments, and so on. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + return this; + } + + /** Rate type. */ + public Builder setRateType(String rateType) { + this.rateType = rateType; + return this; + } + + /** Whether smoking is allowed. */ + public Builder setSmokingIndicator(Boolean smokingIndicator) { + this.smokingIndicator = smokingIndicator; + return this; + } + } + + public enum AccommodationType implements ApiRequestParams.EnumParam { + @SerializedName("apartment") + APARTMENT("apartment"), + + @SerializedName("cabana") + CABANA("cabana"), + + @SerializedName("house") + HOUSE("house"), + + @SerializedName("penthouse") + PENTHOUSE("penthouse"), + + @SerializedName("room") + ROOM("room"), + + @SerializedName("standard") + STANDARD("standard"), + + @SerializedName("suite") + SUITE("suite"), + + @SerializedName("villa") + VILLA("villa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccommodationType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Affiliate partner name. */ + @SerializedName("name") + String name; + + private Affiliate(String code, Map extraParams, String name) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String code; + + private Map extraParams; + + private String name; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.LodgingData.Affiliate build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Affiliate( + this.code, this.extraParams, this.name); + } + + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + 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 ChargeCaptureParams.PaymentDetails.LodgingData.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 ChargeCaptureParams.PaymentDetails.LodgingData.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; + } + + /** Affiliate partner name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Guest { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Guest's full name. */ + @SerializedName("name") + String name; + + private Guest(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 ChargeCaptureParams.PaymentDetails.LodgingData.Guest build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Guest( + 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 ChargeCaptureParams.PaymentDetails.LodgingData.Guest#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.LodgingData.Guest#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. Guest's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Host { + /** Address of the host. */ + @SerializedName("address") + Address address; + + /** Host's country of domicile. */ + @SerializedName("country_of_domicile") + String countryOfDomicile; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Reference number for the host. */ + @SerializedName("host_reference") + String hostReference; + + /** Type of host. */ + @SerializedName("host_type") + HostType hostType; + + /** Name of the lodging property or host. */ + @SerializedName("name") + String name; + + /** Total number of reservations for the host. */ + @SerializedName("number_of_reservations") + Long numberOfReservations; + + /** Property phone number. */ + @SerializedName("property_phone_number") + String propertyPhoneNumber; + + /** Host's registration date. */ + @SerializedName("registered_at") + Long registeredAt; + + private Host( + Address address, + String countryOfDomicile, + Map extraParams, + String hostReference, + HostType hostType, + String name, + Long numberOfReservations, + String propertyPhoneNumber, + Long registeredAt) { + this.address = address; + this.countryOfDomicile = countryOfDomicile; + this.extraParams = extraParams; + this.hostReference = hostReference; + this.hostType = hostType; + this.name = name; + this.numberOfReservations = numberOfReservations; + this.propertyPhoneNumber = propertyPhoneNumber; + this.registeredAt = registeredAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String countryOfDomicile; + + private Map extraParams; + + private String hostReference; + + private HostType hostType; + + private String name; + + private Long numberOfReservations; + + private String propertyPhoneNumber; + + private Long registeredAt; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.LodgingData.Host build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Host( + this.address, + this.countryOfDomicile, + this.extraParams, + this.hostReference, + this.hostType, + this.name, + this.numberOfReservations, + this.propertyPhoneNumber, + this.registeredAt); + } + + /** Address of the host. */ + public Builder setAddress( + ChargeCaptureParams.PaymentDetails.LodgingData.Host.Address address) { + this.address = address; + return this; + } + + /** Host's country of domicile. */ + public Builder setCountryOfDomicile(String countryOfDomicile) { + this.countryOfDomicile = countryOfDomicile; + 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 ChargeCaptureParams.PaymentDetails.LodgingData.Host#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.LodgingData.Host#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Reference number for the host. */ + public Builder setHostReference(String hostReference) { + this.hostReference = hostReference; + return this; + } + + /** Type of host. */ + public Builder setHostType( + ChargeCaptureParams.PaymentDetails.LodgingData.Host.HostType hostType) { + this.hostType = hostType; + return this; + } + + /** Name of the lodging property or host. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Total number of reservations for the host. */ + public Builder setNumberOfReservations(Long numberOfReservations) { + this.numberOfReservations = numberOfReservations; + return this; + } + + /** Property phone number. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } + + /** Host's registration date. */ + public Builder setRegisteredAt(Long registeredAt) { + this.registeredAt = registeredAt; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. 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; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** Required. 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 ChargeCaptureParams.PaymentDetails.LodgingData.Host.Address build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Host.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. 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 + * ChargeCaptureParams.PaymentDetails.LodgingData.Host.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 + * ChargeCaptureParams.PaymentDetails.LodgingData.Host.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; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Required. 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 HostType implements ApiRequestParams.EnumParam { + @SerializedName("hostel") + HOSTEL("hostel"), + + @SerializedName("hotel") + HOTEL("hotel"), + + @SerializedName("owner") + OWNER("owner"), + + @SerializedName("rental_agency") + RENTAL_AGENCY("rental_agency"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + HostType(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + public static class Insurance { + /** Required. Price of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; /** * Map of extra parameters for custom features not available in this client library. The @@ -3764,37 +9643,25 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - String line2; - - /** ZIP or postal code. */ - @SerializedName("postal_code") - String postalCode; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - /** State, county, province, or region. */ - @SerializedName("state") - String state; + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - private Address( - String city, - String country, + private Insurance( + Long amount, + String currency, Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { @@ -3802,52 +9669,43 @@ public static Builder builder() { } public static class Builder { - private String city; + private Long amount; - private String country; + private String currency; private Map extraParams; - private String line1; - - private String line2; - - private String postalCode; + private String insuranceCompanyName; - private String state; + private InsuranceType insuranceType; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Lodging.Address build() { - return new ChargeCaptureParams.PaymentDetails.Lodging.Address( - this.city, - this.country, + public ChargeCaptureParams.PaymentDetails.LodgingData.Insurance build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Insurance( + this.amount, + this.currency, this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); + this.insuranceCompanyName, + this.insuranceType); } - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; + /** Required. Price of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; return this; } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Lodging.Address#extraParams} for the - * field documentation. + * map. See {@link ChargeCaptureParams.PaymentDetails.LodgingData.Insurance#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -3860,8 +9718,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Lodging.Address#extraParams} for the - * field documentation. + * map. See {@link ChargeCaptureParams.PaymentDetails.LodgingData.Insurance#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -3871,35 +9729,66 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; return this; } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + ChargeCaptureParams.PaymentDetails.LodgingData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; return this; } + } - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Total { + /** Required. Total price of the lodging reservation in cents. */ + @SerializedName("amount") + Long amount; + + /** Cash advances in cents. */ + @SerializedName("cash_advances") + Long cashAdvances; + + /** Currency of the total amount. */ + @SerializedName("currency") + String currency; + + /** Discount details for the lodging. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the lodging. */ + @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. @@ -3910,13 +9799,31 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** Prepaid amount in cents. */ + @SerializedName("prepaid_amount") + Long prepaidAmount; - private Affiliate(Map extraParams, String name) { + /** Tax breakdown for the lodging reservation. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + Long cashAdvances, + String currency, + Discounts discounts, + List extraCharges, + Map extraParams, + Long prepaidAmount, + Tax tax) { + this.amount = amount; + this.cashAdvances = cashAdvances; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.name = name; + this.prepaidAmount = prepaidAmount; + this.tax = tax; } public static Builder builder() { @@ -3924,20 +9831,95 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private Long cashAdvances; + + private String currency; + + private Discounts discounts; + + private List + extraCharges; + private Map extraParams; - private String name; + private Long prepaidAmount; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Lodging.Affiliate build() { - return new ChargeCaptureParams.PaymentDetails.Lodging.Affiliate( - this.extraParams, this.name); + public ChargeCaptureParams.PaymentDetails.LodgingData.Total build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Total( + this.amount, + this.cashAdvances, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.prepaidAmount, + this.tax); + } + + /** Required. Total price of the lodging reservation in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Cash advances in cents. */ + public Builder setCashAdvances(Long cashAdvances) { + this.cashAdvances = cashAdvances; + return this; + } + + /** Currency of the total amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details for the lodging. */ + public Builder setDiscounts( + ChargeCaptureParams.PaymentDetails.LodgingData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * ChargeCaptureParams.PaymentDetails.LodgingData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + ChargeCaptureParams.PaymentDetails.LodgingData.Total.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 ChargeCaptureParams.PaymentDetails.LodgingData.Total#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 ChargeCaptureParams.PaymentDetails.Lodging.Affiliate#extraParams} for + * map. See {@link ChargeCaptureParams.PaymentDetails.LodgingData.Total#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3951,7 +9933,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Lodging.Affiliate#extraParams} for + * map. See {@link ChargeCaptureParams.PaymentDetails.LodgingData.Total#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3962,106 +9944,114 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Prepaid amount in cents. */ + public Builder setPrepaidAmount(Long prepaidAmount) { + this.prepaidAmount = prepaidAmount; return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** Tax breakdown for the lodging reservation. */ + public Builder setTax(ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax tax) { + this.tax = tax; + return this; + } + } - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Coupon code. */ + @SerializedName("coupon") + String coupon; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { - this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + private Discounts( + String corporateClientCode, String coupon, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + } - public static class Builder { - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private Mode mode; + public static class Builder { + private String corporateClientCode; - private Recipient recipient; + private String coupon; - /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Lodging.Delivery build() { - return new ChargeCaptureParams.PaymentDetails.Lodging.Delivery( - this.extraParams, this.mode, this.recipient); - } + private Map 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 ChargeCaptureParams.PaymentDetails.Lodging.Delivery#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Discounts build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Discounts( + this.corporateClientCode, this.coupon, this.extraParams); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Lodging.Delivery#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** Coupon code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; } - this.extraParams.putAll(map); - return this; - } - /** The delivery method for the payment. */ - public Builder setMode(ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Mode mode) { - this.mode = mode; - 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 + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Details of the recipient. */ - public Builder setRecipient( - ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { - this.recipient = recipient; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Discounts#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 @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class ExtraCharge { + /** Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; /** * Map of extra parameters for custom features not available in this client library. The @@ -4073,20 +10063,14 @@ public static class Recipient { @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; + /** Type of extra charge. */ + @SerializedName("type") + Type type; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.type = type; } public static Builder builder() { @@ -4094,23 +10078,21 @@ public static Builder builder() { } public static class Builder { - private String email; + private Long amount; private Map extraParams; - private String name; - - private String phone; + private Type type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient build() { - return new ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + public ChargeCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; return this; } @@ -4118,7 +10100,7 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4133,7 +10115,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for the + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4144,159 +10126,256 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** Type of extra charge. */ + public Builder setType( + ChargeCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge.Type type) { + this.type = type; 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 Type 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("phone") + PHONE("phone"), + + @SerializedName("restaurant") + RESTAURANT("restaurant"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; } } } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), - - @SerializedName("phone") - PHONE("phone"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Indicates whether the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - @SerializedName("post") - POST("post"); + /** Tax details. */ + @SerializedName("taxes") + List taxes; - @Getter(onMethod_ = {@Override}) - private final String value; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - Mode(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static class Builder { + private Map extraParams; - /** - * Required. Full name of the person or entity on the lodging reservation. - */ - @SerializedName("name") - String name; + private Boolean taxExemptIndicator; - private Passenger(Map extraParams, String name) { - this.extraParams = extraParams; - this.name = name; - } + private List taxes; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - public static class Builder { - private Map 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 + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.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; + } - private String name; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.Lodging.Passenger build() { - return new ChargeCaptureParams.PaymentDetails.Lodging.Passenger( - this.extraParams, this.name); - } + /** Indicates whether the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + 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 ChargeCaptureParams.PaymentDetails.Lodging.Passenger#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeCaptureParams.PaymentDetails.Lodging.Passenger#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; } - 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; - } - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount in cents. */ + @SerializedName("amount") + Long amount; - public enum Category implements ApiRequestParams.EnumParam { - @SerializedName("hotel") - HOTEL("hotel"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + String type; + + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - @SerializedName("vacation_rental") - VACATION_RENTAL("vacation_rental"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private Long amount; - Category(String value) { - this.value = value; - } - } + private Map extraParams; - public enum ExtraCharge implements ApiRequestParams.EnumParam { - @SerializedName("gift_shop") - GIFT_SHOP("gift_shop"), + private Long rate; - @SerializedName("laundry") - LAUNDRY("laundry"), + private String type; - @SerializedName("mini_bar") - MINI_BAR("mini_bar"), + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - @SerializedName("other") - OTHER("other"), + /** Tax amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - @SerializedName("restaurant") - RESTAURANT("restaurant"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.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; + } - @SerializedName("telephone") - TELEPHONE("telephone"); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.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(onMethod_ = {@Override}) - private final String value; + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } - ExtraCharge(String value) { - this.value = value; + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } } } } diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index e981d5b75f7..448ba7c31e9 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -453,6 +453,10 @@ public static class PaymentDetails { @SerializedName("car_rental") CarRental carRental; + /** Car rental data for this PaymentIntent. */ + @SerializedName("car_rental_data") + Object carRentalData; + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -479,10 +483,18 @@ public static class PaymentDetails { @SerializedName("flight") Flight flight; + /** Flight data for this PaymentIntent. */ + @SerializedName("flight_data") + Object flightData; + /** Lodging reservation details for this PaymentIntent. */ @SerializedName("lodging") Lodging lodging; + /** Lodging data for this PaymentIntent. */ + @SerializedName("lodging_data") + Object lodgingData; + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -504,19 +516,25 @@ public static class PaymentDetails { private PaymentDetails( CarRental carRental, + Object carRentalData, Object customerReference, EventDetails eventDetails, Map extraParams, Flight flight, + Object flightData, Lodging lodging, + Object lodgingData, Object orderReference, Subscription subscription) { this.carRental = carRental; + this.carRentalData = carRentalData; this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; this.flight = flight; + this.flightData = flightData; this.lodging = lodging; + this.lodgingData = lodgingData; this.orderReference = orderReference; this.subscription = subscription; } @@ -528,6 +546,8 @@ public static Builder builder() { public static class Builder { private CarRental carRental; + private Object carRentalData; + private Object customerReference; private EventDetails eventDetails; @@ -536,8 +556,12 @@ public static class Builder { private Flight flight; + private Object flightData; + private Lodging lodging; + private Object lodgingData; + private Object orderReference; private Subscription subscription; @@ -546,11 +570,14 @@ public static class Builder { public ChargeUpdateParams.PaymentDetails build() { return new ChargeUpdateParams.PaymentDetails( this.carRental, + this.carRentalData, this.customerReference, this.eventDetails, this.extraParams, this.flight, + this.flightData, this.lodging, + this.lodgingData, this.orderReference, this.subscription); } @@ -561,6 +588,49 @@ public Builder setCarRental(ChargeUpdateParams.PaymentDetails.CarRental carRenta return this; } + /** + * Add an element to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCarRentalData(ChargeUpdateParams.PaymentDetails.CarRentalData element) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = new ArrayList(); + } + ((List) this.carRentalData).add(element); + return this; + } + + /** + * Add all elements to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCarRentalData( + List elements) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = new ArrayList(); + } + ((List) this.carRentalData) + .addAll(elements); + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData(EmptyParam carRentalData) { + this.carRentalData = carRentalData; + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData( + List carRentalData) { + this.carRentalData = carRentalData; + return this; + } + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -621,12 +691,94 @@ public Builder setFlight(ChargeUpdateParams.PaymentDetails.Flight flight) { return this; } + /** + * Add an element to `flightData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFlightData(ChargeUpdateParams.PaymentDetails.FlightData element) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData).add(element); + return this; + } + + /** + * Add all elements to `flightData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFlightData(List elements) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData).addAll(elements); + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData(EmptyParam flightData) { + this.flightData = flightData; + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData(List flightData) { + this.flightData = flightData; + return this; + } + /** Lodging reservation details for this PaymentIntent. */ public Builder setLodging(ChargeUpdateParams.PaymentDetails.Lodging lodging) { this.lodging = lodging; return this; } + /** + * Add an element to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLodgingData(ChargeUpdateParams.PaymentDetails.LodgingData element) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData).add(element); + return this; + } + + /** + * Add all elements to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLodgingData( + List elements) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData).addAll(elements); + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData(EmptyParam lodgingData) { + this.lodgingData = lodgingData; + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData( + List lodgingData) { + this.lodgingData = lodgingData; + return this; + } + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -2178,30 +2330,38 @@ public enum RateInterval implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - 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. */ + public static class CarRentalData { + /** Affiliate (such as travel agency) details for the rental. */ @SerializedName("affiliate") Affiliate affiliate; - /** The name of the company. */ - @SerializedName("company") - Object company; + /** Booking confirmation number for the car rental. */ + @SerializedName("booking_number") + Object bookingNumber; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** Name of the car rental company. */ + @SerializedName("carrier_name") + Object carrierName; - /** Event end time. Measured in seconds since the Unix epoch. */ - @SerializedName("ends_at") - Long endsAt; + /** Customer service phone number for the car rental company. */ + @SerializedName("customer_service_phone_number") + Object customerServicePhoneNumber; + + /** Number of days the car is being rented. */ + @SerializedName("days_rented") + Long daysRented; + + /** Distance details for the rental. */ + @SerializedName("distance") + Distance distance; + + /** List of drivers for the rental. */ + @SerializedName("drivers") + List drivers; + + /** Required. Drop-off location details. */ + @SerializedName("drop_off") + DropOff dropOff; /** * Map of extra parameters for custom features not available in this client library. The @@ -2212,39 +2372,61 @@ public static class EventDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Type of the event entertainment (concert, sports event etc). */ - @SerializedName("genre") - Object genre; + /** Insurance details for the rental. */ + @SerializedName("insurances") + List insurances; - /** Required. The name of the event. */ - @SerializedName("name") - Object name; + /** Indicates if the customer was a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; - /** Event start time. Measured in seconds since the Unix epoch. */ - @SerializedName("starts_at") - Long startsAt; + /** Required. Pickup location details. */ + @SerializedName("pickup") + Pickup pickup; - private EventDetails( - Boolean accessControlledVenue, - Address address, + /** Name of the person renting the vehicle. */ + @SerializedName("renter_name") + Object renterName; + + /** Required. Total cost breakdown for the rental. */ + @SerializedName("total") + Total total; + + /** Vehicle details for the rental. */ + @SerializedName("vehicle") + Vehicle vehicle; + + private CarRentalData( Affiliate affiliate, - Object company, - Delivery delivery, - Long endsAt, + Object bookingNumber, + Object carrierName, + Object customerServicePhoneNumber, + Long daysRented, + Distance distance, + List drivers, + DropOff dropOff, Map extraParams, - Object genre, - Object name, - Long startsAt) { - this.accessControlledVenue = accessControlledVenue; - this.address = address; + List insurances, + Boolean noShowIndicator, + Pickup pickup, + Object renterName, + Total total, + Vehicle vehicle) { this.affiliate = affiliate; - this.company = company; - this.delivery = delivery; - this.endsAt = endsAt; + this.bookingNumber = bookingNumber; + this.carrierName = carrierName; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.daysRented = daysRented; + this.distance = distance; + this.drivers = drivers; + this.dropOff = dropOff; this.extraParams = extraParams; - this.genre = genre; - this.name = name; - this.startsAt = startsAt; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.pickup = pickup; + this.renterName = renterName; + this.total = total; + this.vehicle = vehicle; } public static Builder builder() { @@ -2252,90 +2434,150 @@ public static Builder builder() { } public static class Builder { - private Boolean accessControlledVenue; + private Affiliate affiliate; - private Address address; + private Object bookingNumber; - private Affiliate affiliate; + private Object carrierName; - private Object company; + private Object customerServicePhoneNumber; - private Delivery delivery; + private Long daysRented; - private Long endsAt; + private Distance distance; + + private List drivers; + + private DropOff dropOff; private Map extraParams; - private Object genre; + private List insurances; - private Object name; + private Boolean noShowIndicator; - private Long startsAt; + private Pickup pickup; + + private Object renterName; + + private Total total; + + private Vehicle vehicle; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.EventDetails build() { - return new ChargeUpdateParams.PaymentDetails.EventDetails( - this.accessControlledVenue, - this.address, + public ChargeUpdateParams.PaymentDetails.CarRentalData build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData( this.affiliate, - this.company, - this.delivery, - this.endsAt, + this.bookingNumber, + this.carrierName, + this.customerServicePhoneNumber, + this.daysRented, + this.distance, + this.drivers, + this.dropOff, this.extraParams, - this.genre, - this.name, - this.startsAt); + this.insurances, + this.noShowIndicator, + this.pickup, + this.renterName, + this.total, + this.vehicle); } - /** Indicates if the tickets are digitally checked when entering the venue. */ - public Builder setAccessControlledVenue(Boolean accessControlledVenue) { - this.accessControlledVenue = accessControlledVenue; + /** Affiliate (such as travel agency) details for the rental. */ + public Builder setAffiliate( + ChargeUpdateParams.PaymentDetails.CarRentalData.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - /** The event location's address. */ - public Builder setAddress(ChargeUpdateParams.PaymentDetails.EventDetails.Address address) { - this.address = address; + /** Booking confirmation number for the car rental. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - ChargeUpdateParams.PaymentDetails.EventDetails.Affiliate affiliate) { - this.affiliate = affiliate; + /** Booking confirmation number for the car rental. */ + public Builder setBookingNumber(EmptyParam bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** The name of the company. */ - public Builder setCompany(String company) { - this.company = company; + /** Name of the car rental company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; return this; } - /** The name of the company. */ - public Builder setCompany(EmptyParam company) { - this.company = company; + /** Name of the car rental company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; return this; } - /** Delivery details for this purchase. */ - public Builder setDelivery( - ChargeUpdateParams.PaymentDetails.EventDetails.Delivery delivery) { - this.delivery = delivery; + /** Customer service phone number for the car rental company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; return this; } - /** Event end time. Measured in seconds since the Unix epoch. */ - public Builder setEndsAt(Long endsAt) { - this.endsAt = endsAt; + /** Customer service phone number for the car rental company. */ + public Builder setCustomerServicePhoneNumber(EmptyParam customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** Number of days the car is being rented. */ + public Builder setDaysRented(Long daysRented) { + this.daysRented = daysRented; + return this; + } + + /** Distance details for the rental. */ + public Builder setDistance( + ChargeUpdateParams.PaymentDetails.CarRentalData.Distance distance) { + this.distance = distance; + 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 + * ChargeUpdateParams.PaymentDetails.CarRentalData#drivers} for the field documentation. + */ + public Builder addDriver(ChargeUpdateParams.PaymentDetails.CarRentalData.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 + * ChargeUpdateParams.PaymentDetails.CarRentalData#drivers} for the field documentation. + */ + public Builder addAllDriver( + List elements) { + if (this.drivers == null) { + this.drivers = new ArrayList<>(); + } + this.drivers.addAll(elements); + return this; + } + + /** Required. Drop-off location details. */ + public Builder setDropOff(ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff dropOff) { + this.dropOff = dropOff; 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 ChargeUpdateParams.PaymentDetails.EventDetails#extraParams} for the field - * documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -2348,8 +2590,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.EventDetails#extraParams} for the field - * documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -2359,50 +2601,77 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Type of the event entertainment (concert, sports event etc). */ - public Builder setGenre(String genre) { - this.genre = genre; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.CarRentalData#insurances} for the field documentation. + */ + public Builder addInsurance( + ChargeUpdateParams.PaymentDetails.CarRentalData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** Type of the event entertainment (concert, sports event etc). */ - public Builder setGenre(EmptyParam genre) { - this.genre = genre; + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.CarRentalData#insurances} for the field documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); return this; } - /** Required. The name of the event. */ - public Builder setName(String name) { - this.name = name; + /** Indicates if the customer was a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; return this; } - /** Required. The name of the event. */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Required. Pickup location details. */ + public Builder setPickup(ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup pickup) { + this.pickup = pickup; return this; } - /** Event start time. Measured in seconds since the Unix epoch. */ - public Builder setStartsAt(Long startsAt) { - this.startsAt = startsAt; + /** Name of the person renting the vehicle. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Name of the person renting the vehicle. */ + public Builder setRenterName(EmptyParam renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total cost breakdown for the rental. */ + public Builder setTotal(ChargeUpdateParams.PaymentDetails.CarRentalData.Total total) { + this.total = total; + return this; + } + + /** Vehicle details for the rental. */ + public Builder setVehicle(ChargeUpdateParams.PaymentDetails.CarRentalData.Vehicle vehicle) { + this.vehicle = vehicle; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - Object city; - - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - Object country; + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + Object code; /** * Map of extra parameters for custom features not available in this client library. The @@ -2414,37 +2683,14 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - Object line1; - - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - Object line2; - - /** ZIP or postal code. */ - @SerializedName("postal_code") - Object postalCode; - - /** State, county, province, or region. */ - @SerializedName("state") - Object state; + /** Name of affiliate partner. */ + @SerializedName("name") + Object name; - private Address( - Object city, - Object country, - Map extraParams, - Object line1, - Object line2, - Object postalCode, - Object state) { - this.city = city; - this.country = country; + private Affiliate(Object code, Map extraParams, Object name) { + this.code = code; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.name = name; } public static Builder builder() { @@ -2452,67 +2698,35 @@ public static Builder builder() { } public static class Builder { - private Object city; - - private Object country; + private Object code; private Map extraParams; - private Object line1; - - private Object line2; - - private Object postalCode; - - private Object state; + private Object name; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.EventDetails.Address build() { - return new ChargeUpdateParams.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; - } - - /** City, district, suburb, town, or village. */ - public Builder setCity(EmptyParam city) { - this.city = city; - return this; + public ChargeUpdateParams.PaymentDetails.CarRentalData.Affiliate build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Affiliate( + this.code, this.extraParams, this.name); } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; return this; } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(EmptyParam country) { - this.country = country; + /** Affiliate partner code. */ + public Builder setCode(EmptyParam code) { + this.code = code; 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 ChargeUpdateParams.PaymentDetails.EventDetails.Address#extraParams} for - * the field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Affiliate#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -2525,8 +2739,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.EventDetails.Address#extraParams} for - * the field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Affiliate#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -2536,51 +2750,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } - - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(EmptyParam line1) { - this.line1 = line1; - return this; - } - - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } - - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(EmptyParam line2) { - this.line2 = line2; - return this; - } - - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } - - /** ZIP or postal code. */ - public Builder setPostalCode(EmptyParam postalCode) { - this.postalCode = postalCode; - return this; - } - - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; return this; } - /** State, county, province, or region. */ - public Builder setState(EmptyParam state) { - this.state = state; + /** Name of affiliate partner. */ + public Builder setName(EmptyParam name) { + this.name = name; return this; } } @@ -2588,7 +2766,11 @@ public Builder setState(EmptyParam state) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Distance { + /** Required. Distance traveled. */ + @SerializedName("amount") + Long amount; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2599,13 +2781,17 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - Object name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + @SerializedName("unit") + Unit unit; - private Affiliate(Map extraParams, Object name) { + private Distance(Long amount, Map extraParams, Unit unit) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; + this.unit = unit; } public static Builder builder() { @@ -2613,20 +2799,28 @@ public static Builder builder() { } public static class Builder { + private Long amount; + private Map extraParams; - private Object name; + private Unit unit; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.EventDetails.Affiliate build() { - return new ChargeUpdateParams.PaymentDetails.EventDetails.Affiliate( - this.extraParams, this.name); + public ChargeUpdateParams.PaymentDetails.CarRentalData.Distance build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Distance( + this.amount, this.extraParams, this.unit); + } + + /** Required. Distance traveled. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 ChargeUpdateParams.PaymentDetails.EventDetails.Affiliate#extraParams} + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Distance#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2640,7 +2834,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.EventDetails.Affiliate#extraParams} + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Distance#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2651,23 +2845,48 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + public Builder setUnit( + ChargeUpdateParams.PaymentDetails.CarRentalData.Distance.Unit unit) { + this.unit = unit; return this; } + } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; + public enum Unit implements ApiRequestParams.EnumParam { + @SerializedName("kilometers") + KILOMETERS("kilometers"), + + @SerializedName("miles") + MILES("miles"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Unit(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Driver { + /** Driver's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Driver's identification number. */ + @SerializedName("driver_identification_number") + Object driverIdentificationNumber; + + /** Driver's tax number. */ + @SerializedName("driver_tax_number") + Object driverTaxNumber; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2678,18 +2897,21 @@ public static class Delivery { @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; + /** Required. Driver's full name. */ + @SerializedName("name") + Object name; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Driver( + DateOfBirth dateOfBirth, + Object driverIdentificationNumber, + Object driverTaxNumber, + Map extraParams, + Object name) { + this.dateOfBirth = dateOfBirth; + this.driverIdentificationNumber = driverIdentificationNumber; + this.driverTaxNumber = driverTaxNumber; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.name = name; } public static Builder builder() { @@ -2697,23 +2919,62 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; + private DateOfBirth dateOfBirth; - private Mode mode; + private Object driverIdentificationNumber; - private Recipient recipient; + private Object driverTaxNumber; + + private Map extraParams; + + private Object name; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.EventDetails.Delivery build() { - return new ChargeUpdateParams.PaymentDetails.EventDetails.Delivery( - this.extraParams, this.mode, this.recipient); + public ChargeUpdateParams.PaymentDetails.CarRentalData.Driver build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Driver( + this.dateOfBirth, + this.driverIdentificationNumber, + this.driverTaxNumber, + this.extraParams, + this.name); + } + + /** Driver's date of birth. */ + public Builder setDateOfBirth( + ChargeUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Driver's identification number. */ + public Builder setDriverIdentificationNumber(String driverIdentificationNumber) { + this.driverIdentificationNumber = driverIdentificationNumber; + return this; + } + + /** Driver's identification number. */ + public Builder setDriverIdentificationNumber(EmptyParam driverIdentificationNumber) { + this.driverIdentificationNumber = driverIdentificationNumber; + return this; + } + + /** Driver's tax number. */ + public Builder setDriverTaxNumber(String driverTaxNumber) { + this.driverTaxNumber = driverTaxNumber; + return this; + } + + /** Driver's tax number. */ + public Builder setDriverTaxNumber(EmptyParam driverTaxNumber) { + this.driverTaxNumber = driverTaxNumber; + 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 ChargeUpdateParams.PaymentDetails.EventDetails.Delivery#extraParams} - * for the field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Driver#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -2726,8 +2987,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.EventDetails.Delivery#extraParams} - * for the field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Driver#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -2737,27 +2998,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Mode mode) { - this.mode = mode; + /** Required. Driver's full name. */ + public Builder setName(String name) { + this.name = name; return this; } - /** Details of the recipient. */ - public Builder setRecipient( - ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Driver's full name. */ + public Builder setName(EmptyParam name) { + this.name = name; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - Object email; + public static class DateOfBirth { + /** Required. Day of birth (1-31). */ + @SerializedName("day") + Long day; /** * Map of extra parameters for custom features not available in this client library. The @@ -2769,20 +3028,19 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - Object name; + /** Required. Month of birth (1-12). */ + @SerializedName("month") + Long month; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - Object phone; + /** Required. Year of birth (must be greater than 1900). */ + @SerializedName("year") + Long year; - private Recipient( - Object email, Map extraParams, Object name, Object phone) { - this.email = email; + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.month = month; + this.year = year; } public static Builder builder() { @@ -2790,29 +3048,23 @@ public static Builder builder() { } public static class Builder { - private Object email; + private Long day; private Map extraParams; - private Object name; + private Long month; - private Object phone; + private Long year; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient build() { - return new ChargeUpdateParams.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; + public ChargeUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth( + this.day, this.extraParams, this.month, this.year); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(EmptyParam email) { - this.email = email; + /** Required. Day of birth (1-31). */ + public Builder setDay(Long day) { + this.day = day; return this; } @@ -2820,7 +3072,7 @@ public Builder setEmail(EmptyParam email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} for + * ChargeUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2835,7 +3087,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} for + * ChargeUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -2846,321 +3098,345 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; - return this; - } - - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(EmptyParam 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; + /** Required. Month of birth (1-12). */ + public Builder setMonth(Long month) { + this.month = month; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; + /** Required. Year of birth (must be greater than 1900). */ + public Builder setYear(Long year) { + this.year = year; return this; } } } + } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DropOff { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; - @SerializedName("phone") - PHONE("phone"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Location name. */ + @SerializedName("location_name") + Object locationName; - @SerializedName("post") - POST("post"); + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - @Getter(onMethod_ = {@Override}) - private final String value; + private DropOff( + Address address, Map extraParams, Object locationName, Long time) { + this.address = address; + this.extraParams = extraParams; + this.locationName = locationName; + this.time = time; + } - Mode(String value) { - this.value = value; - } + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Flight { - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + public static class Builder { + private Address address; - /** - * The agency number (i.e. International Air Transport Association (IATA) agency number) of - * the travel agency that made the booking. - */ - @SerializedName("agency_number") - Object agencyNumber; + private Map extraParams; - /** - * The International Air Transport Association (IATA) carrier code of the carrier that issued - * the ticket. - */ - @SerializedName("carrier") - Object carrier; + private Object locationName; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + private Long time; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff( + this.address, this.extraParams, this.locationName, this.time); + } - /** The name of the person or entity on the reservation. */ - @SerializedName("passenger_name") - Object passengerName; + /** Required. Address of the rental location. */ + public Builder setAddress( + ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff.Address address) { + this.address = address; + return this; + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Required. The individual flight segments associated with the trip. */ - @SerializedName("segments") - List segments; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff#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 ticket number associated with the travel reservation. */ - @SerializedName("ticket_number") - Object ticketNumber; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; + return this; + } - private Flight( - Affiliate affiliate, - Object agencyNumber, - Object carrier, - Delivery delivery, - Map extraParams, - Object passengerName, - List passengers, - List segments, - Object 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; - } + /** Location name. */ + public Builder setLocationName(EmptyParam locationName) { + this.locationName = locationName; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; + return this; + } + } - public static class Builder { - private Affiliate affiliate; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; - private Object agencyNumber; + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; - private Object carrier; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Delivery delivery; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + Object line1; - private Map extraParams; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; - private Object passengerName; + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; - private List passengers; + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } - private List segments; + public static Builder builder() { + return new Builder(); + } - private Object ticketNumber; + public static class Builder { + private Object city; - /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Flight build() { - return new ChargeUpdateParams.PaymentDetails.Flight( - this.affiliate, - this.agencyNumber, - this.carrier, - this.delivery, - this.extraParams, - this.passengerName, - this.passengers, - this.segments, - this.ticketNumber); - } + private Object country; - /** Affiliate details for this purchase. */ - public Builder setAffiliate(ChargeUpdateParams.PaymentDetails.Flight.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + private Map extraParams; - /** - * 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; - } + private Object line1; - /** - * The agency number (i.e. International Air Transport Association (IATA) agency number) of - * the travel agency that made the booking. - */ - public Builder setAgencyNumber(EmptyParam agencyNumber) { - this.agencyNumber = agencyNumber; - return this; - } + private Object line2; - /** - * 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; - } + private Object postalCode; - /** - * The International Air Transport Association (IATA) carrier code of the carrier that - * issued the ticket. - */ - public Builder setCarrier(EmptyParam carrier) { - this.carrier = carrier; - return this; - } + private Object state; - /** Delivery details for this purchase. */ - public Builder setDelivery(ChargeUpdateParams.PaymentDetails.Flight.Delivery delivery) { - this.delivery = delivery; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff.Address build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.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; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.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; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - /** The name of the person or entity on the reservation. */ - public Builder setPassengerName(String passengerName) { - this.passengerName = passengerName; - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** The name of the person or entity on the reservation. */ - public Builder setPassengerName(EmptyParam passengerName) { - this.passengerName = passengerName; - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + 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 - * ChargeUpdateParams.PaymentDetails.Flight#passengers} for the field documentation. - */ - public Builder addPassenger(ChargeUpdateParams.PaymentDetails.Flight.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.add(element); - 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 + * ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff.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 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 - * ChargeUpdateParams.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 all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.CarRentalData.DropOff.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; + } - /** - * 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 - * ChargeUpdateParams.PaymentDetails.Flight#segments} for the field documentation. - */ - public Builder addSegment(ChargeUpdateParams.PaymentDetails.Flight.Segment element) { - if (this.segments == null) { - this.segments = new ArrayList<>(); - } - this.segments.add(element); - return this; - } + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + 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 - * ChargeUpdateParams.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; - } + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } - /** The ticket number associated with the travel reservation. */ - public Builder setTicketNumber(String ticketNumber) { - this.ticketNumber = ticketNumber; - return this; - } + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - /** The ticket number associated with the travel reservation. */ - public Builder setTicketNumber(EmptyParam ticketNumber) { - this.ticketNumber = ticketNumber; - return this; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Insurance { + /** Required. Amount of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the insurance amount. */ + @SerializedName("currency") + Object currency; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -3171,13 +3447,25 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - Object name; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; - private Affiliate(Map extraParams, Object name) { + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.name = name; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { @@ -3185,21 +3473,49 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private Object currency; + private Map extraParams; - private Object name; + private Object insuranceCompanyName; + + private InsuranceType insuranceType; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Flight.Affiliate build() { - return new ChargeUpdateParams.PaymentDetails.Flight.Affiliate( - this.extraParams, this.name); + public ChargeUpdateParams.PaymentDetails.CarRentalData.Insurance build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Amount of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Flight.Affiliate#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Insurance#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -3212,8 +3528,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Flight.Affiliate#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Insurance#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -3223,23 +3539,62 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + ChargeUpdateParams.PaymentDetails.CarRentalData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; return this; } } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("liability_supplement") + LIABILITY_SUPPLEMENT("liability_supplement"), + + @SerializedName("loss_damage_waiver") + LOSS_DAMAGE_WAIVER("loss_damage_waiver"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_damage_waiver") + PARTIAL_DAMAGE_WAIVER("partial_damage_waiver"), + + @SerializedName("personal_accident") + PERSONAL_ACCIDENT("personal_accident"), + + @SerializedName("personal_effects") + PERSONAL_EFFECTS("personal_effects"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Pickup { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -3250,18 +3605,20 @@ public static class Delivery { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** Location name. */ + @SerializedName("location_name") + Object locationName; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Pickup( + Address address, Map extraParams, Object locationName, Long time) { + this.address = address; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.locationName = locationName; + this.time = time; } public static Builder builder() { @@ -3269,23 +3626,32 @@ public static Builder builder() { } public static class Builder { + private Address address; + private Map extraParams; - private Mode mode; + private Object locationName; - private Recipient recipient; + private Long time; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Flight.Delivery build() { - return new ChargeUpdateParams.PaymentDetails.Flight.Delivery( - this.extraParams, this.mode, this.recipient); + public ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup( + this.address, this.extraParams, this.locationName, this.time); + } + + /** Required. Address of the rental location. */ + public Builder setAddress( + ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup.Address address) { + this.address = address; + 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 ChargeUpdateParams.PaymentDetails.Flight.Delivery#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -3298,8 +3664,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Flight.Delivery#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -3309,26 +3675,38 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode(ChargeUpdateParams.PaymentDetails.Flight.Delivery.Mode mode) { - this.mode = mode; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; return this; } - /** Details of the recipient. */ - public Builder setRecipient( - ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Location name. */ + public Builder setLocationName(EmptyParam locationName) { + this.locationName = locationName; + return this; + } + + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - Object email; + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; /** * Map of extra parameters for custom features not available in this client library. The @@ -3340,20 +3718,39 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - Object name; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + Object line1; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - Object phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; - private Recipient( - Object email, Map extraParams, Object name, Object phone) { - this.email = email; + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } public static Builder builder() { @@ -3361,29 +3758,59 @@ public static Builder builder() { } public static class Builder { - private Object email; + private Object city; + + private Object country; private Map extraParams; - private Object name; + private Object line1; - private Object phone; + private Object line2; + + private Object postalCode; + + private Object state; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient build() { - return new ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + public ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup.Address build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; return this; } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(EmptyParam email) { - this.email = email; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; return this; } @@ -3391,7 +3818,7 @@ public Builder setEmail(EmptyParam email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3406,7 +3833,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3417,57 +3844,82 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(EmptyParam name) { - this.name = name; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; return this; } - } - } - - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), - - @SerializedName("phone") - PHONE("phone"), - @SerializedName("pickup") - PICKUP("pickup"), + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("post") - POST("post"); + /** Required. ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } - Mode(String value) { - this.value = value; + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Passenger { + public static class Total { + /** Required. Total amount in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the amount. */ + @SerializedName("currency") + Object currency; + + /** Discount details for the rental. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the rental. */ + @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. @@ -3478,15 +3930,35 @@ public static class Passenger { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. Full name of the person or entity on the flight reservation. - */ - @SerializedName("name") - Object name; + /** Rate per unit for the rental. */ + @SerializedName("rate_per_unit") + Long ratePerUnit; - private Passenger(Map extraParams, Object name) { + /** Unit of measurement for the rate. */ + @SerializedName("rate_unit") + RateUnit rateUnit; + + /** Tax breakdown for the rental. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + Object currency, + Discounts discounts, + List extraCharges, + Map extraParams, + Long ratePerUnit, + RateUnit rateUnit, + Tax tax) { + this.amount = amount; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.name = name; + this.ratePerUnit = ratePerUnit; + this.rateUnit = rateUnit; + this.tax = tax; } public static Builder builder() { @@ -3494,21 +3966,96 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private Object currency; + + private Discounts discounts; + + private List + extraCharges; + private Map extraParams; - private Object name; + private Long ratePerUnit; + + private RateUnit rateUnit; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Flight.Passenger build() { - return new ChargeUpdateParams.PaymentDetails.Flight.Passenger( - this.extraParams, this.name); + public ChargeUpdateParams.PaymentDetails.CarRentalData.Total build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total( + this.amount, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.ratePerUnit, + this.rateUnit, + this.tax); + } + + /** Required. Total amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency of the amount. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Discount details for the rental. */ + public Builder setDiscounts( + ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + ChargeUpdateParams.PaymentDetails.CarRentalData.Total.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 ChargeUpdateParams.PaymentDetails.CarRentalData.Total#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 ChargeUpdateParams.PaymentDetails.Flight.Passenger#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Total#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -3521,8 +4068,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Flight.Passenger#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Total#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -3532,61 +4079,5813 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Full name of the person or entity on the flight reservation. - */ - public Builder setName(String name) { - this.name = name; + /** Rate per unit for the rental. */ + public Builder setRatePerUnit(Long ratePerUnit) { + this.ratePerUnit = ratePerUnit; return this; } - /** - * Required. Full name of the person or entity on the flight reservation. - */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Unit of measurement for the rate. */ + public Builder setRateUnit( + ChargeUpdateParams.PaymentDetails.CarRentalData.Total.RateUnit rateUnit) { + this.rateUnit = rateUnit; + return this; + } + + /** Tax breakdown for the rental. */ + public Builder setTax(ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax tax) { + this.tax = tax; return this; } } - } - @Getter + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + Object corporateClientCode; + + /** Coupon code applied to the rental. */ + @SerializedName("coupon") + Object coupon; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Maximum number of free miles or kilometers included. */ + @SerializedName("maximum_free_miles_or_kilometers") + Long maximumFreeMilesOrKilometers; + + private Discounts( + Object corporateClientCode, + Object coupon, + Map extraParams, + Long maximumFreeMilesOrKilometers) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object corporateClientCode; + + private Object coupon; + + private Map extraParams; + + private Long maximumFreeMilesOrKilometers; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Discounts build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Discounts( + this.corporateClientCode, + this.coupon, + this.extraParams, + this.maximumFreeMilesOrKilometers); + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(EmptyParam corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** Coupon code applied to the rental. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } + + /** Coupon code applied to the rental. */ + public Builder setCoupon(EmptyParam coupon) { + this.coupon = coupon; + 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 + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Maximum number of free miles or kilometers included. */ + public Builder setMaximumFreeMilesOrKilometers(Long maximumFreeMilesOrKilometers) { + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Required. Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Type of extra charge. */ + @SerializedName("type") + Type type; + + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } + + /** Required. Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge#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. Type of extra charge. */ + public Builder setType( + ChargeUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("extra_mileage") + EXTRA_MILEAGE("extra_mileage"), + + @SerializedName("gas") + GAS("gas"), + + @SerializedName("gps") + GPS("gps"), + + @SerializedName("late_charge") + LATE_CHARGE("late_charge"), + + @SerializedName("one_way_drop_off") + ONE_WAY_DROP_OFF("one_way_drop_off"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("parking") + PARKING("parking"), + + @SerializedName("phone") + PHONE("phone"), + + @SerializedName("regular_mileage") + REGULAR_MILEAGE("regular_mileage"), + + @SerializedName("towing") + TOWING("towing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; + + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; + + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean taxExemptIndicator; + + private List taxes; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.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 + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.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; + } + + /** Indicates if the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } + + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } + + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate applied. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + Object type; + + private Tax(Long amount, Map extraParams, Long rate, Object type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private Object type; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.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 + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.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; + } + + /** Tax rate applied. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + + /** Type of tax applied. */ + public Builder setType(EmptyParam type) { + this.type = type; + return this; + } + } + } + } + + public enum RateUnit implements ApiRequestParams.EnumParam { + @SerializedName("days") + DAYS("days"), + + @SerializedName("kilometers") + KILOMETERS("kilometers"), + + @SerializedName("miles") + MILES("miles"), + + @SerializedName("months") + MONTHS("months"), + + @SerializedName("weeks") + WEEKS("weeks"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RateUnit(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vehicle { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Make of the rental vehicle. */ + @SerializedName("make") + Object make; + + /** Model of the rental vehicle. */ + @SerializedName("model") + Object model; + + /** Odometer reading at the time of rental. */ + @SerializedName("odometer") + Long odometer; + + /** Type of the rental vehicle. */ + @SerializedName("type") + Type type; + + /** Class of the rental vehicle. */ + @SerializedName("vehicle_class") + VehicleClass vehicleClass; + + /** Vehicle identification number (VIN). */ + @SerializedName("vehicle_identification_number") + Object vehicleIdentificationNumber; + + private Vehicle( + Map extraParams, + Object make, + Object model, + Long odometer, + Type type, + VehicleClass vehicleClass, + Object vehicleIdentificationNumber) { + this.extraParams = extraParams; + this.make = make; + this.model = model; + this.odometer = odometer; + this.type = type; + this.vehicleClass = vehicleClass; + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object make; + + private Object model; + + private Long odometer; + + private Type type; + + private VehicleClass vehicleClass; + + private Object vehicleIdentificationNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.CarRentalData.Vehicle build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Vehicle( + this.extraParams, + this.make, + this.model, + this.odometer, + this.type, + this.vehicleClass, + this.vehicleIdentificationNumber); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Vehicle#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.CarRentalData.Vehicle#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Make of the rental vehicle. */ + public Builder setMake(String make) { + this.make = make; + return this; + } + + /** Make of the rental vehicle. */ + public Builder setMake(EmptyParam make) { + this.make = make; + return this; + } + + /** Model of the rental vehicle. */ + public Builder setModel(String model) { + this.model = model; + return this; + } + + /** Model of the rental vehicle. */ + public Builder setModel(EmptyParam model) { + this.model = model; + return this; + } + + /** Odometer reading at the time of rental. */ + public Builder setOdometer(Long odometer) { + this.odometer = odometer; + return this; + } + + /** Type of the rental vehicle. */ + public Builder setType( + ChargeUpdateParams.PaymentDetails.CarRentalData.Vehicle.Type type) { + this.type = type; + return this; + } + + /** Class of the rental vehicle. */ + public Builder setVehicleClass( + ChargeUpdateParams.PaymentDetails.CarRentalData.Vehicle.VehicleClass vehicleClass) { + this.vehicleClass = vehicleClass; + return this; + } + + /** Vehicle identification number (VIN). */ + public Builder setVehicleIdentificationNumber(String vehicleIdentificationNumber) { + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + return this; + } + + /** Vehicle identification number (VIN). */ + public Builder setVehicleIdentificationNumber(EmptyParam vehicleIdentificationNumber) { + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("cargo_van") + CARGO_VAN("cargo_van"), + + @SerializedName("compact") + COMPACT("compact"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("exotic") + EXOTIC("exotic"), + + @SerializedName("exotic_suv") + EXOTIC_SUV("exotic_suv"), + + @SerializedName("fifteen_passenger_van") + FIFTEEN_PASSENGER_VAN("fifteen_passenger_van"), + + @SerializedName("four_wheel_drive") + FOUR_WHEEL_DRIVE("four_wheel_drive"), + + @SerializedName("full_size") + FULL_SIZE("full_size"), + + @SerializedName("intermediate") + INTERMEDIATE("intermediate"), + + @SerializedName("large_suv") + LARGE_SUV("large_suv"), + + @SerializedName("large_truck") + LARGE_TRUCK("large_truck"), + + @SerializedName("luxury") + LUXURY("luxury"), + + @SerializedName("medium_suv") + MEDIUM_SUV("medium_suv"), + + @SerializedName("midsize") + MIDSIZE("midsize"), + + @SerializedName("mini") + MINI("mini"), + + @SerializedName("minivan") + MINIVAN("minivan"), + + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), + + @SerializedName("moped") + MOPED("moped"), + + @SerializedName("moving_van") + MOVING_VAN("moving_van"), + + @SerializedName("premium") + PREMIUM("premium"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("small_medium_truck") + SMALL_MEDIUM_TRUCK("small_medium_truck"), + + @SerializedName("small_suv") + SMALL_SUV("small_suv"), + + @SerializedName("special") + SPECIAL("special"), + + @SerializedName("standard") + STANDARD("standard"), + + @SerializedName("stretch") + STRETCH("stretch"), + + @SerializedName("subcompact") + SUBCOMPACT("subcompact"), + + @SerializedName("taxi") + TAXI("taxi"), + + @SerializedName("twelve_foot_truck") + TWELVE_FOOT_TRUCK("twelve_foot_truck"), + + @SerializedName("twelve_passenger_van") + TWELVE_PASSENGER_VAN("twelve_passenger_van"), + + @SerializedName("twenty_foot_truck") + TWENTY_FOOT_TRUCK("twenty_foot_truck"), + + @SerializedName("twenty_four_foot_truck") + TWENTY_FOUR_FOOT_TRUCK("twenty_four_foot_truck"), + + @SerializedName("twenty_six_foot_truck") + TWENTY_SIX_FOOT_TRUCK("twenty_six_foot_truck"), + + @SerializedName("unique") + UNIQUE("unique"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + + public enum VehicleClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VehicleClass(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object 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") + Object genre; + + /** Required. The name of the event. */ + @SerializedName("name") + Object name; + + /** Event start time. Measured in seconds since the Unix epoch. */ + @SerializedName("starts_at") + Long startsAt; + + private EventDetails( + Boolean accessControlledVenue, + Address address, + Affiliate affiliate, + Object company, + Delivery delivery, + Long endsAt, + Map extraParams, + Object genre, + Object 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 Object company; + + private Delivery delivery; + + private Long endsAt; + + private Map extraParams; + + private Object genre; + + private Object name; + + private Long startsAt; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.EventDetails build() { + return new ChargeUpdateParams.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(ChargeUpdateParams.PaymentDetails.EventDetails.Address address) { + this.address = address; + return this; + } + + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + ChargeUpdateParams.PaymentDetails.EventDetails.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** The name of the company. */ + public Builder setCompany(String company) { + this.company = company; + return this; + } + + /** The name of the company. */ + public Builder setCompany(EmptyParam company) { + this.company = company; + return this; + } + + /** Delivery details for this purchase. */ + public Builder setDelivery( + ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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; + } + + /** Type of the event entertainment (concert, sports event etc). */ + public Builder setGenre(EmptyParam genre) { + this.genre = genre; + return this; + } + + /** Required. The name of the event. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. The name of the event. */ + public Builder setName(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.EventDetails.Address build() { + return new ChargeUpdateParams.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; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.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 ChargeUpdateParams.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object name; + + private Affiliate(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.EventDetails.Affiliate build() { + return new ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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; + } + + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 ChargeUpdateParams.PaymentDetails.EventDetails.Delivery build() { + return new ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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( + ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @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; + + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + Object name; + + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + Object phone; + + private Recipient( + Object email, Map extraParams, Object name, Object 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 Object email; + + private Map extraParams; + + private Object name; + + private Object phone; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient build() { + return new ChargeUpdateParams.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; + } + + /** The email of the recipient the ticket is delivered to. */ + 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 + * ChargeUpdateParams.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 + * ChargeUpdateParams.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 name of the recipient the ticket is delivered to. */ + public Builder setName(EmptyParam 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; + } + + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + 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") + Object agencyNumber; + + /** + * The International Air Transport Association (IATA) carrier code of the carrier that issued + * the ticket. + */ + @SerializedName("carrier") + Object 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") + Object 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") + Object ticketNumber; + + private Flight( + Affiliate affiliate, + Object agencyNumber, + Object carrier, + Delivery delivery, + Map extraParams, + Object passengerName, + List passengers, + List segments, + Object 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 Object agencyNumber; + + private Object carrier; + + private Delivery delivery; + + private Map extraParams; + + private Object passengerName; + + private List passengers; + + private List segments; + + private Object ticketNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Flight build() { + return new ChargeUpdateParams.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(ChargeUpdateParams.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 agency number (i.e. International Air Transport Association (IATA) agency number) of + * the travel agency that made the booking. + */ + public Builder setAgencyNumber(EmptyParam 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; + } + + /** + * The International Air Transport Association (IATA) carrier code of the carrier that + * issued the ticket. + */ + public Builder setCarrier(EmptyParam carrier) { + this.carrier = carrier; + return this; + } + + /** Delivery details for this purchase. */ + public Builder setDelivery(ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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; + } + + /** The name of the person or entity on the reservation. */ + public Builder setPassengerName(EmptyParam 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 + * ChargeUpdateParams.PaymentDetails.Flight#passengers} for the field documentation. + */ + public Builder addPassenger(ChargeUpdateParams.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 + * ChargeUpdateParams.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 + * ChargeUpdateParams.PaymentDetails.Flight#segments} for the field documentation. + */ + public Builder addSegment(ChargeUpdateParams.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 + * ChargeUpdateParams.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; + } + + /** The ticket number associated with the travel reservation. */ + public Builder setTicketNumber(EmptyParam ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object name; + + private Affiliate(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Flight.Affiliate build() { + return new ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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; + } + + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 ChargeUpdateParams.PaymentDetails.Flight.Delivery build() { + return new ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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(ChargeUpdateParams.PaymentDetails.Flight.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @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; + + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + Object name; + + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + Object phone; + + private Recipient( + Object email, Map extraParams, Object name, Object 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 Object email; + + private Map extraParams; + + private Object name; + + private Object phone; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new ChargeUpdateParams.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; + } + + /** The email of the recipient the ticket is delivered to. */ + 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 + * ChargeUpdateParams.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 + * ChargeUpdateParams.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 name of the recipient the ticket is delivered to. */ + public Builder setName(EmptyParam 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; + } + + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + 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") + Object name; + + private Passenger(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Flight.Passenger build() { + return new ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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; + } + + /** + * Required. Full name of the person or entity on the flight reservation. + */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object 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") + Object 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") + Object 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") + Object flightNumber; + + /** The fare class for the segment. */ + @SerializedName("service_class") + ServiceClass serviceClass; + + private Segment( + Long amount, + Object arrivalAirport, + Long arrivesAt, + Object carrier, + Long departsAt, + Object departureAirport, + Map extraParams, + Object 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 Object arrivalAirport; + + private Long arrivesAt; + + private Object carrier; + + private Long departsAt; + + private Object departureAirport; + + private Map extraParams; + + private Object flightNumber; + + private ServiceClass serviceClass; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Flight.Segment build() { + return new ChargeUpdateParams.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 International Air Transport Association (IATA) airport code for the arrival + * airport. + */ + public Builder setArrivalAirport(EmptyParam 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; + } + + /** + * The International Air Transport Association (IATA) carrier code of the carrier + * operating the flight segment. + */ + public Builder setCarrier(EmptyParam 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; + } + + /** + * The International Air Transport Association (IATA) airport code for the departure + * airport. + */ + public Builder setDepartureAirport(EmptyParam 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 ChargeUpdateParams.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 ChargeUpdateParams.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 flight number associated with the segment. */ + public Builder setFlightNumber(EmptyParam flightNumber) { + this.flightNumber = flightNumber; + return this; + } + + /** The fare class for the segment. */ + public Builder setServiceClass( + ChargeUpdateParams.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 + @EqualsAndHashCode(callSuper = false) + public static class FlightData { + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Reservation reference. */ + @SerializedName("booking_number") + Object bookingNumber; + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + @SerializedName("computerized_reservation_system") + Object computerizedReservationSystem; + + /** Ticket restrictions. */ + @SerializedName("endorsements_and_restrictions") + Object endorsementsAndRestrictions; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances. */ + @SerializedName("insurances") + List insurances; + + /** List of passengers. */ + @SerializedName("passengers") + List passengers; + + /** Required. List of flight segments. */ + @SerializedName("segments") + List segments; + + /** Electronic ticket indicator. */ + @SerializedName("ticket_electronically_issued_indicator") + Boolean ticketElectronicallyIssuedIndicator; + + /** Required. Total cost breakdown. */ + @SerializedName("total") + Total total; + + /** Type of flight transaction. */ + @SerializedName("transaction_type") + TransactionType transactionType; + + private FlightData( + Affiliate affiliate, + Object bookingNumber, + Object computerizedReservationSystem, + Object endorsementsAndRestrictions, + Map extraParams, + List insurances, + List passengers, + List segments, + Boolean ticketElectronicallyIssuedIndicator, + Total total, + TransactionType transactionType) { + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.computerizedReservationSystem = computerizedReservationSystem; + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.segments = segments; + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + this.total = total; + this.transactionType = transactionType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Affiliate affiliate; + + private Object bookingNumber; + + private Object computerizedReservationSystem; + + private Object endorsementsAndRestrictions; + + private Map extraParams; + + private List insurances; + + private List passengers; + + private List segments; + + private Boolean ticketElectronicallyIssuedIndicator; + + private Total total; + + private TransactionType transactionType; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData build() { + return new ChargeUpdateParams.PaymentDetails.FlightData( + this.affiliate, + this.bookingNumber, + this.computerizedReservationSystem, + this.endorsementsAndRestrictions, + this.extraParams, + this.insurances, + this.passengers, + this.segments, + this.ticketElectronicallyIssuedIndicator, + this.total, + this.transactionType); + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + ChargeUpdateParams.PaymentDetails.FlightData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Reservation reference. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Reservation reference. */ + public Builder setBookingNumber(EmptyParam bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + public Builder setComputerizedReservationSystem(String computerizedReservationSystem) { + this.computerizedReservationSystem = computerizedReservationSystem; + return this; + } + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + public Builder setComputerizedReservationSystem(EmptyParam computerizedReservationSystem) { + this.computerizedReservationSystem = computerizedReservationSystem; + return this; + } + + /** Ticket restrictions. */ + public Builder setEndorsementsAndRestrictions(String endorsementsAndRestrictions) { + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + return this; + } + + /** Ticket restrictions. */ + public Builder setEndorsementsAndRestrictions(EmptyParam endorsementsAndRestrictions) { + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + 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 ChargeUpdateParams.PaymentDetails.FlightData#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FlightData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData#insurances} for the field documentation. + */ + public Builder addInsurance( + ChargeUpdateParams.PaymentDetails.FlightData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData#insurances} for the field documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * ChargeUpdateParams.PaymentDetails.FlightData#passengers} for the field documentation. + */ + public Builder addPassenger( + ChargeUpdateParams.PaymentDetails.FlightData.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 + * ChargeUpdateParams.PaymentDetails.FlightData#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 + * ChargeUpdateParams.PaymentDetails.FlightData#segments} for the field documentation. + */ + public Builder addSegment(ChargeUpdateParams.PaymentDetails.FlightData.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 + * ChargeUpdateParams.PaymentDetails.FlightData#segments} for the field documentation. + */ + public Builder addAllSegment( + List elements) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.addAll(elements); + return this; + } + + /** Electronic ticket indicator. */ + public Builder setTicketElectronicallyIssuedIndicator( + Boolean ticketElectronicallyIssuedIndicator) { + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + return this; + } + + /** Required. Total cost breakdown. */ + public Builder setTotal(ChargeUpdateParams.PaymentDetails.FlightData.Total total) { + this.total = total; + return this; + } + + /** Type of flight transaction. */ + public Builder setTransactionType( + ChargeUpdateParams.PaymentDetails.FlightData.TransactionType transactionType) { + this.transactionType = transactionType; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + Object code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of affiliate partner. */ + @SerializedName("name") + Object name; + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + @SerializedName("travel_authorization_code") + Object travelAuthorizationCode; + + private Affiliate( + Object code, + Map extraParams, + Object name, + Object travelAuthorizationCode) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + this.travelAuthorizationCode = travelAuthorizationCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object code; + + private Map extraParams; + + private Object name; + + private Object travelAuthorizationCode; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Affiliate build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Affiliate( + this.code, this.extraParams, this.name, this.travelAuthorizationCode); + } + + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + return this; + } + + /** Affiliate partner code. */ + public Builder setCode(EmptyParam code) { + this.code = code; + 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 ChargeUpdateParams.PaymentDetails.FlightData.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 ChargeUpdateParams.PaymentDetails.FlightData.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; + } + + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Name of affiliate partner. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + public Builder setTravelAuthorizationCode(String travelAuthorizationCode) { + this.travelAuthorizationCode = travelAuthorizationCode; + return this; + } + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + public Builder setTravelAuthorizationCode(EmptyParam travelAuthorizationCode) { + this.travelAuthorizationCode = travelAuthorizationCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Insurance cost. */ + @SerializedName("amount") + Long amount; + + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Insurance company name. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Required. Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Insurance build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Insurance cost. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FlightData.Insurance#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FlightData.Insurance#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Insurance company name. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Insurance company name. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance. */ + public Builder setInsuranceType( + ChargeUpdateParams.PaymentDetails.FlightData.Insurance.InsuranceType insuranceType) { + this.insuranceType = insuranceType; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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. Passenger's full name. */ + @SerializedName("name") + Object name; + + private Passenger(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Passenger build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.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 ChargeUpdateParams.PaymentDetails.FlightData.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 ChargeUpdateParams.PaymentDetails.FlightData.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. Passenger's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. Passenger's full name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Segment { + /** Segment fare amount. */ + @SerializedName("amount") + Long amount; + + /** Required. Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Required. Airline carrier code. */ + @SerializedName("carrier_code") + Object carrierCode; + + /** Carrier name. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Segment currency. */ + @SerializedName("currency") + Object currency; + + /** Required. Departure details. */ + @SerializedName("departure") + Departure departure; + + /** Exchange ticket number. */ + @SerializedName("exchange_ticket_number") + Object exchangeTicketNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Fare basis code. */ + @SerializedName("fare_basis_code") + Object fareBasisCode; + + /** Additional fees. */ + @SerializedName("fees") + Long fees; + + /** Flight number. */ + @SerializedName("flight_number") + Object flightNumber; + + /** Stopover indicator. */ + @SerializedName("is_stop_over_indicator") + Boolean isStopOverIndicator; + + /** Refundable ticket indicator. */ + @SerializedName("refundable") + Boolean refundable; + + /** Required. Class of service. */ + @SerializedName("service_class") + ServiceClass serviceClass; + + /** Tax amount for segment. */ + @SerializedName("tax_amount") + Long taxAmount; + + /** Ticket number. */ + @SerializedName("ticket_number") + Object ticketNumber; + + private Segment( + Long amount, + Arrival arrival, + Object carrierCode, + Object carrierName, + Object currency, + Departure departure, + Object exchangeTicketNumber, + Map extraParams, + Object fareBasisCode, + Long fees, + Object flightNumber, + Boolean isStopOverIndicator, + Boolean refundable, + ServiceClass serviceClass, + Long taxAmount, + Object ticketNumber) { + this.amount = amount; + this.arrival = arrival; + this.carrierCode = carrierCode; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.exchangeTicketNumber = exchangeTicketNumber; + this.extraParams = extraParams; + this.fareBasisCode = fareBasisCode; + this.fees = fees; + this.flightNumber = flightNumber; + this.isStopOverIndicator = isStopOverIndicator; + this.refundable = refundable; + this.serviceClass = serviceClass; + this.taxAmount = taxAmount; + this.ticketNumber = ticketNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Arrival arrival; + + private Object carrierCode; + + private Object carrierName; + + private Object currency; + + private Departure departure; + + private Object exchangeTicketNumber; + + private Map extraParams; + + private Object fareBasisCode; + + private Long fees; + + private Object flightNumber; + + private Boolean isStopOverIndicator; + + private Boolean refundable; + + private ServiceClass serviceClass; + + private Long taxAmount; + + private Object ticketNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Segment build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Segment( + this.amount, + this.arrival, + this.carrierCode, + this.carrierName, + this.currency, + this.departure, + this.exchangeTicketNumber, + this.extraParams, + this.fareBasisCode, + this.fees, + this.flightNumber, + this.isStopOverIndicator, + this.refundable, + this.serviceClass, + this.taxAmount, + this.ticketNumber); + } + + /** Segment fare amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Required. Arrival details. */ + public Builder setArrival( + ChargeUpdateParams.PaymentDetails.FlightData.Segment.Arrival arrival) { + this.arrival = arrival; + return this; + } + + /** Required. Airline carrier code. */ + public Builder setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** Required. Airline carrier code. */ + public Builder setCarrierCode(EmptyParam carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** Carrier name. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Carrier name. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Segment currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Segment currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Required. Departure details. */ + public Builder setDeparture( + ChargeUpdateParams.PaymentDetails.FlightData.Segment.Departure departure) { + this.departure = departure; + return this; + } + + /** Exchange ticket number. */ + public Builder setExchangeTicketNumber(String exchangeTicketNumber) { + this.exchangeTicketNumber = exchangeTicketNumber; + return this; + } + + /** Exchange ticket number. */ + public Builder setExchangeTicketNumber(EmptyParam exchangeTicketNumber) { + this.exchangeTicketNumber = exchangeTicketNumber; + 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 ChargeUpdateParams.PaymentDetails.FlightData.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 ChargeUpdateParams.PaymentDetails.FlightData.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; + } + + /** Fare basis code. */ + public Builder setFareBasisCode(String fareBasisCode) { + this.fareBasisCode = fareBasisCode; + return this; + } + + /** Fare basis code. */ + public Builder setFareBasisCode(EmptyParam fareBasisCode) { + this.fareBasisCode = fareBasisCode; + return this; + } + + /** Additional fees. */ + public Builder setFees(Long fees) { + this.fees = fees; + return this; + } + + /** Flight number. */ + public Builder setFlightNumber(String flightNumber) { + this.flightNumber = flightNumber; + return this; + } + + /** Flight number. */ + public Builder setFlightNumber(EmptyParam flightNumber) { + this.flightNumber = flightNumber; + return this; + } + + /** Stopover indicator. */ + public Builder setIsStopOverIndicator(Boolean isStopOverIndicator) { + this.isStopOverIndicator = isStopOverIndicator; + return this; + } + + /** Refundable ticket indicator. */ + public Builder setRefundable(Boolean refundable) { + this.refundable = refundable; + return this; + } + + /** Required. Class of service. */ + public Builder setServiceClass( + ChargeUpdateParams.PaymentDetails.FlightData.Segment.ServiceClass serviceClass) { + this.serviceClass = serviceClass; + return this; + } + + /** Tax amount for segment. */ + public Builder setTaxAmount(Long taxAmount) { + this.taxAmount = taxAmount; + return this; + } + + /** Ticket number. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + + /** Ticket number. */ + public Builder setTicketNumber(EmptyParam ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Required. Arrival airport IATA code. */ + @SerializedName("airport") + Object airport; + + /** Arrival date/time. */ + @SerializedName("arrives_at") + Long arrivesAt; + + /** Arrival city. */ + @SerializedName("city") + Object city; + + /** Arrival country. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Arrival( + Object airport, + Long arrivesAt, + Object city, + Object country, + Map extraParams) { + this.airport = airport; + this.arrivesAt = arrivesAt; + this.city = city; + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object airport; + + private Long arrivesAt; + + private Object city; + + private Object country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Segment.Arrival build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Segment.Arrival( + this.airport, this.arrivesAt, this.city, this.country, this.extraParams); + } + + /** Required. Arrival airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } + + /** Required. Arrival airport IATA code. */ + public Builder setAirport(EmptyParam airport) { + this.airport = airport; + return this; + } + + /** Arrival date/time. */ + public Builder setArrivesAt(Long arrivesAt) { + this.arrivesAt = arrivesAt; + return this; + } + + /** Arrival city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Arrival city. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** Arrival country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** Arrival country. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData.Segment.Arrival#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData.Segment.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Required. Departure airport IATA code. */ + @SerializedName("airport") + Object airport; + + /** Departure city. */ + @SerializedName("city") + Object city; + + /** Departure country. */ + @SerializedName("country") + Object country; + + /** Required. Departure date/time. */ + @SerializedName("departs_at") + Long departsAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Departure( + Object airport, + Object city, + Object country, + Long departsAt, + Map extraParams) { + this.airport = airport; + this.city = city; + this.country = country; + this.departsAt = departsAt; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object airport; + + private Object city; + + private Object country; + + private Long departsAt; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Segment.Departure build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Segment.Departure( + this.airport, this.city, this.country, this.departsAt, this.extraParams); + } + + /** Required. Departure airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } + + /** Required. Departure airport IATA code. */ + public Builder setAirport(EmptyParam airport) { + this.airport = airport; + return this; + } + + /** Departure city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Departure city. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** Departure country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** Departure country. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** Required. Departure date/time. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + 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 + * ChargeUpdateParams.PaymentDetails.FlightData.Segment.Departure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData.Segment.Departure#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 ServiceClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Total { + /** Required. Total flight amount. */ + @SerializedName("amount") + Long amount; + + /** Reason for credit. */ + @SerializedName("credit_reason") + CreditReason creditReason; + + /** Total currency. */ + @SerializedName("currency") + Object currency; + + /** Discount details. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges. */ + @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; + + /** Tax breakdown. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + CreditReason creditReason, + Object currency, + Discounts discounts, + List extraCharges, + Map extraParams, + Tax tax) { + this.amount = amount; + this.creditReason = creditReason; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private CreditReason creditReason; + + private Object currency; + + private Discounts discounts; + + private List extraCharges; + + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Total build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Total( + this.amount, + this.creditReason, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.tax); + } + + /** Required. Total flight amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Reason for credit. */ + public Builder setCreditReason( + ChargeUpdateParams.PaymentDetails.FlightData.Total.CreditReason creditReason) { + this.creditReason = creditReason; + return this; + } + + /** Total currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Total currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Discount details. */ + public Builder setDiscounts( + ChargeUpdateParams.PaymentDetails.FlightData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * ChargeUpdateParams.PaymentDetails.FlightData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + ChargeUpdateParams.PaymentDetails.FlightData.Total.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 ChargeUpdateParams.PaymentDetails.FlightData.Total#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 ChargeUpdateParams.PaymentDetails.FlightData.Total#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FlightData.Total#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 breakdown. */ + public Builder setTax(ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + Object corporateClientCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Discounts(Object corporateClientCode, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object corporateClientCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Total.Discounts build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Discounts( + this.corporateClientCode, this.extraParams); + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(EmptyParam corporateClientCode) { + this.corporateClientCode = corporateClientCode; + 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 + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Discounts#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 + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of additional charges. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 additional charges. */ + @SerializedName("type") + Type type; + + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } + + /** Amount of additional charges. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 + * ChargeUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge#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 additional charges. */ + public Builder setType( + ChargeUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("additional_fees") + ADDITIONAL_FEES("additional_fees"), + + @SerializedName("ancillary_service_charges") + ANCILLARY_SERVICE_CHARGES("ancillary_service_charges"), + + @SerializedName("exchange_fee") + EXCHANGE_FEE("exchange_fee"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; + + private Tax( + Map extraParams, + List taxes) { + this.extraParams = extraParams; + this.taxes = taxes; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List taxes; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax( + this.extraParams, this.taxes); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData.Total.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 + * ChargeUpdateParams.PaymentDetails.FlightData.Total.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; + } + + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } + + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax. */ + @SerializedName("type") + Object type; + + private Tax(Long amount, Map extraParams, Long rate, Object type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private Object type; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.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 + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.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; + } + + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax. */ + public Builder setType(String type) { + this.type = type; + return this; + } + + /** Type of tax. */ + public Builder setType(EmptyParam type) { + this.type = type; + return this; + } + } + } + } + + public enum CreditReason implements ApiRequestParams.EnumParam { + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_ticket_refund") + PARTIAL_TICKET_REFUND("partial_ticket_refund"), + + @SerializedName("passenger_transport_ancillary_cancellation") + PASSENGER_TRANSPORT_ANCILLARY_CANCELLATION("passenger_transport_ancillary_cancellation"), + + @SerializedName("ticket_and_ancillary_cancellation") + TICKET_AND_ANCILLARY_CANCELLATION("ticket_and_ancillary_cancellation"), + + @SerializedName("ticket_cancellation") + TICKET_CANCELLATION("ticket_cancellation"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CreditReason(String value) { + this.value = value; + } + } + } + + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("exchange_ticket") + EXCHANGE_TICKET("exchange_ticket"), + + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), + + @SerializedName("refund") + REFUND("refund"), + + @SerializedName("ticket_purchase") + TICKET_PURCHASE("ticket_purchase"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object bookingNumber; + + /** The lodging category. */ + @SerializedName("category") + Category category; + + /** + * Required. Lodging 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") + Object 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") + Object 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") + Object propertyPhoneNumber; + + /** The room class for this purchase. */ + @SerializedName("room_class") + Object 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, + Object bookingNumber, + Category category, + Long checkinAt, + Long checkoutAt, + Object customerServicePhoneNumber, + Long dailyRoomRateAmount, + Delivery delivery, + List extraCharges, + Map extraParams, + Boolean fireSafetyActCompliance, + Object name, + Boolean noShow, + Long numberOfRooms, + List passengers, + Object propertyPhoneNumber, + Object 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 Object bookingNumber; + + private Category category; + + private Long checkinAt; + + private Long checkoutAt; + + private Object customerServicePhoneNumber; + + private Long dailyRoomRateAmount; + + private Delivery delivery; + + private List extraCharges; + + private Map extraParams; + + private Boolean fireSafetyActCompliance; + + private Object name; + + private Boolean noShow; + + private Long numberOfRooms; + + private List passengers; + + private Object propertyPhoneNumber; + + private Object roomClass; + + private Long roomNights; + + private Long totalRoomTaxAmount; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Lodging build() { + return new ChargeUpdateParams.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(ChargeUpdateParams.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(ChargeUpdateParams.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 booking number associated with the lodging reservation. */ + public Builder setBookingNumber(EmptyParam bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** The lodging category. */ + public Builder setCategory(ChargeUpdateParams.PaymentDetails.Lodging.Category category) { + this.category = category; + return this; + } + + /** + * Required. Lodging 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 customer service phone number of the lodging company. */ + public Builder setCustomerServicePhoneNumber(EmptyParam 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(ChargeUpdateParams.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 + * ChargeUpdateParams.PaymentDetails.Lodging#extraCharges} for the field documentation. + */ + public Builder addExtraCharge( + ChargeUpdateParams.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 + * ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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; + } + + /** The name of the lodging location. */ + public Builder setName(EmptyParam 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 + * ChargeUpdateParams.PaymentDetails.Lodging#passengers} for the field documentation. + */ + public Builder addPassenger(ChargeUpdateParams.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 + * ChargeUpdateParams.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 phone number of the lodging location. */ + public Builder setPropertyPhoneNumber(EmptyParam propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } + + /** The room class for this purchase. */ + public Builder setRoomClass(String roomClass) { + this.roomClass = roomClass; + return this; + } + + /** The room class for this purchase. */ + public Builder setRoomClass(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Lodging.Address build() { + return new ChargeUpdateParams.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; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.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 ChargeUpdateParams.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object name; + + private Affiliate(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Lodging.Affiliate build() { + return new ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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; + } + + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 ChargeUpdateParams.PaymentDetails.Lodging.Delivery build() { + return new ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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(ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @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; + + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + Object name; + + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + Object phone; + + private Recipient( + Object email, Map extraParams, Object name, Object 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 Object email; + + private Map extraParams; + + private Object name; + + private Object phone; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new ChargeUpdateParams.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; + } + + /** The email of the recipient the ticket is delivered to. */ + 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 + * ChargeUpdateParams.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 + * ChargeUpdateParams.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 name of the recipient the ticket is delivered to. */ + public Builder setName(EmptyParam 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; + } + + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(EmptyParam 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 @EqualsAndHashCode(callSuper = false) - public static class Segment { - /** The flight segment amount. */ - @SerializedName("amount") - Long amount; + 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") + Object name; + + private Passenger(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.Lodging.Passenger build() { + return new ChargeUpdateParams.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 ChargeUpdateParams.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 ChargeUpdateParams.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; + } + + /** + * Required. Full name of the person or entity on the lodging + * reservation. + */ + public Builder setName(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + public static class LodgingData { + /** Accommodation details for the lodging. */ + @SerializedName("accommodation") + Accommodation accommodation; + + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Booking confirmation number for the lodging. */ + @SerializedName("booking_number") + Object bookingNumber; + + /** Required. Check-in date. */ + @SerializedName("checkin_at") + Long checkinAt; + + /** Required. Check-out date. */ + @SerializedName("checkout_at") + Long checkoutAt; + + /** Customer service phone number for the lodging company. */ + @SerializedName("customer_service_phone_number") + Object customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + @SerializedName("fire_safety_act_compliance_indicator") + Boolean fireSafetyActComplianceIndicator; + + /** List of guests for the lodging. */ + @SerializedName("guests") + List guests; + + /** Host details for the lodging. */ + @SerializedName("host") + Host host; + + /** List of insurances for the lodging. */ + @SerializedName("insurances") + List insurances; + + /** Whether the renter is a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; + + /** Renter ID number for the lodging. */ + @SerializedName("renter_id_number") + Object renterIdNumber; + + /** Renter name for the lodging. */ + @SerializedName("renter_name") + Object renterName; + + /** Required. Total details for the lodging. */ + @SerializedName("total") + Total total; + + private LodgingData( + Accommodation accommodation, + Affiliate affiliate, + Object bookingNumber, + Long checkinAt, + Long checkoutAt, + Object customerServicePhoneNumber, + Map extraParams, + Boolean fireSafetyActComplianceIndicator, + List guests, + Host host, + List insurances, + Boolean noShowIndicator, + Object renterIdNumber, + Object renterName, + Total total) { + this.accommodation = accommodation; + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.checkinAt = checkinAt; + this.checkoutAt = checkoutAt; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + this.guests = guests; + this.host = host; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.renterIdNumber = renterIdNumber; + this.renterName = renterName; + this.total = total; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Accommodation accommodation; + + private Affiliate affiliate; + + private Object bookingNumber; + + private Long checkinAt; + + private Long checkoutAt; + + private Object customerServicePhoneNumber; + + private Map extraParams; + + private Boolean fireSafetyActComplianceIndicator; + + private List guests; + + private Host host; + + private List insurances; + + private Boolean noShowIndicator; + + private Object renterIdNumber; + + private Object renterName; + + private Total total; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData( + this.accommodation, + this.affiliate, + this.bookingNumber, + this.checkinAt, + this.checkoutAt, + this.customerServicePhoneNumber, + this.extraParams, + this.fireSafetyActComplianceIndicator, + this.guests, + this.host, + this.insurances, + this.noShowIndicator, + this.renterIdNumber, + this.renterName, + this.total); + } + + /** Accommodation details for the lodging. */ + public Builder setAccommodation( + ChargeUpdateParams.PaymentDetails.LodgingData.Accommodation accommodation) { + this.accommodation = accommodation; + return this; + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + ChargeUpdateParams.PaymentDetails.LodgingData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Booking confirmation number for the lodging. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Booking confirmation number for the lodging. */ + public Builder setBookingNumber(EmptyParam bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Required. Check-in date. */ + public Builder setCheckinAt(Long checkinAt) { + this.checkinAt = checkinAt; + return this; + } + + /** Required. Check-out date. */ + public Builder setCheckoutAt(Long checkoutAt) { + this.checkoutAt = checkoutAt; + return this; + } + + /** Customer service phone number for the lodging company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** Customer service phone number for the lodging company. */ + public Builder setCustomerServicePhoneNumber(EmptyParam customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } /** - * The International Air Transport Association (IATA) airport code for the arrival airport. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData#extraParams} for the field + * documentation. */ - @SerializedName("arrival_airport") - Object arrivalAirport; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ - @SerializedName("arrives_at") - Long arrivesAt; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + public Builder setFireSafetyActComplianceIndicator( + Boolean fireSafetyActComplianceIndicator) { + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + return this; + } /** - * The International Air Transport Association (IATA) carrier code of the carrier operating - * the flight segment. + * Add an element to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData#guests} for the field documentation. */ - @SerializedName("carrier") - Object carrier; + public Builder addGuest(ChargeUpdateParams.PaymentDetails.LodgingData.Guest element) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.add(element); + return this; + } /** - * Required. The departure time for the flight segment. Measured in seconds - * since the Unix epoch. + * Add all elements to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData#guests} for the field documentation. */ - @SerializedName("departs_at") - Long departsAt; + public Builder addAllGuest( + List elements) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.addAll(elements); + return this; + } + + /** Host details for the lodging. */ + public Builder setHost(ChargeUpdateParams.PaymentDetails.LodgingData.Host host) { + this.host = host; + return this; + } /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData#insurances} for the field documentation. */ - @SerializedName("departure_airport") - Object departureAirport; + public Builder addInsurance( + ChargeUpdateParams.PaymentDetails.LodgingData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData#insurances} for the field documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Whether the renter is a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } + + /** Renter ID number for the lodging. */ + public Builder setRenterIdNumber(String renterIdNumber) { + this.renterIdNumber = renterIdNumber; + return this; + } + + /** Renter ID number for the lodging. */ + public Builder setRenterIdNumber(EmptyParam renterIdNumber) { + this.renterIdNumber = renterIdNumber; + return this; + } + + /** Renter name for the lodging. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Renter name for the lodging. */ + public Builder setRenterName(EmptyParam renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total details for the lodging. */ + public Builder setTotal(ChargeUpdateParams.PaymentDetails.LodgingData.Total total) { + this.total = total; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Accommodation { + /** Type of accommodation. */ + @SerializedName("accommodation_type") + AccommodationType accommodationType; + + /** Bed type. */ + @SerializedName("bed_type") + Object bedType; + + /** Daily accommodation rate in cents. */ + @SerializedName("daily_rate_amount") + Long dailyRateAmount; /** * Map of extra parameters for custom features not available in this client library. The @@ -3598,33 +9897,39 @@ public static class Segment { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The flight number associated with the segment. */ - @SerializedName("flight_number") - Object flightNumber; + /** Number of nights. */ + @SerializedName("nights") + Long nights; - /** The fare class for the segment. */ - @SerializedName("service_class") - ServiceClass serviceClass; + /** Number of rooms, cabanas, apartments, and so on. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; - private Segment( - Long amount, - Object arrivalAirport, - Long arrivesAt, - Object carrier, - Long departsAt, - Object departureAirport, + /** Rate type. */ + @SerializedName("rate_type") + Object rateType; + + /** Whether smoking is allowed. */ + @SerializedName("smoking_indicator") + Boolean smokingIndicator; + + private Accommodation( + AccommodationType accommodationType, + Object bedType, + Long dailyRateAmount, Map extraParams, - Object flightNumber, - ServiceClass serviceClass) { - this.amount = amount; - this.arrivalAirport = arrivalAirport; - this.arrivesAt = arrivesAt; - this.carrier = carrier; - this.departsAt = departsAt; - this.departureAirport = departureAirport; + Long nights, + Long numberOfRooms, + Object rateType, + Boolean smokingIndicator) { + this.accommodationType = accommodationType; + this.bedType = bedType; + this.dailyRateAmount = dailyRateAmount; this.extraParams = extraParams; - this.flightNumber = flightNumber; - this.serviceClass = serviceClass; + this.nights = nights; + this.numberOfRooms = numberOfRooms; + this.rateType = rateType; + this.smokingIndicator = smokingIndicator; } public static Builder builder() { @@ -3632,118 +9937,217 @@ public static Builder builder() { } public static class Builder { - private Long amount; - - private Object arrivalAirport; + private AccommodationType accommodationType; - private Long arrivesAt; + private Object bedType; - private Object carrier; + private Long dailyRateAmount; - private Long departsAt; + private Map extraParams; - private Object departureAirport; + private Long nights; - private Map extraParams; + private Long numberOfRooms; - private Object flightNumber; + private Object rateType; - private ServiceClass serviceClass; + private Boolean smokingIndicator; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Flight.Segment build() { - return new ChargeUpdateParams.PaymentDetails.Flight.Segment( - this.amount, - this.arrivalAirport, - this.arrivesAt, - this.carrier, - this.departsAt, - this.departureAirport, + public ChargeUpdateParams.PaymentDetails.LodgingData.Accommodation build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Accommodation( + this.accommodationType, + this.bedType, + this.dailyRateAmount, this.extraParams, - this.flightNumber, - this.serviceClass); + this.nights, + this.numberOfRooms, + this.rateType, + this.smokingIndicator); } - /** The flight segment amount. */ - public Builder setAmount(Long amount) { - this.amount = amount; + /** Type of accommodation. */ + public Builder setAccommodationType( + ChargeUpdateParams.PaymentDetails.LodgingData.Accommodation.AccommodationType + accommodationType) { + this.accommodationType = accommodationType; return this; } - /** - * The International Air Transport Association (IATA) airport code for the arrival - * airport. - */ - public Builder setArrivalAirport(String arrivalAirport) { - this.arrivalAirport = arrivalAirport; + /** Bed type. */ + public Builder setBedType(String bedType) { + this.bedType = bedType; return this; } - /** - * The International Air Transport Association (IATA) airport code for the arrival - * airport. - */ - public Builder setArrivalAirport(EmptyParam arrivalAirport) { - this.arrivalAirport = arrivalAirport; + /** Bed type. */ + public Builder setBedType(EmptyParam bedType) { + this.bedType = bedType; return this; } - /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ - public Builder setArrivesAt(Long arrivesAt) { - this.arrivesAt = arrivesAt; + /** Daily accommodation rate in cents. */ + public Builder setDailyRateAmount(Long dailyRateAmount) { + this.dailyRateAmount = dailyRateAmount; return this; } /** - * The International Air Transport Association (IATA) carrier code of the carrier - * operating the flight segment. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData.Accommodation#extraParams} for the field + * documentation. */ - public Builder setCarrier(String carrier) { - this.carrier = carrier; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * The International Air Transport Association (IATA) carrier code of the carrier - * operating the flight segment. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData.Accommodation#extraParams} for the field + * documentation. */ - public Builder setCarrier(EmptyParam carrier) { - this.carrier = carrier; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); 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; + /** Number of nights. */ + public Builder setNights(Long nights) { + this.nights = nights; + return this; + } + + /** Number of rooms, cabanas, apartments, and so on. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + return this; + } + + /** Rate type. */ + public Builder setRateType(String rateType) { + this.rateType = rateType; + return this; + } + + /** Rate type. */ + public Builder setRateType(EmptyParam rateType) { + this.rateType = rateType; return this; } - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - public Builder setDepartureAirport(String departureAirport) { - this.departureAirport = departureAirport; + /** Whether smoking is allowed. */ + public Builder setSmokingIndicator(Boolean smokingIndicator) { + this.smokingIndicator = smokingIndicator; + return this; + } + } + + public enum AccommodationType implements ApiRequestParams.EnumParam { + @SerializedName("apartment") + APARTMENT("apartment"), + + @SerializedName("cabana") + CABANA("cabana"), + + @SerializedName("house") + HOUSE("house"), + + @SerializedName("penthouse") + PENTHOUSE("penthouse"), + + @SerializedName("room") + ROOM("room"), + + @SerializedName("standard") + STANDARD("standard"), + + @SerializedName("suite") + SUITE("suite"), + + @SerializedName("villa") + VILLA("villa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccommodationType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + Object code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Affiliate partner name. */ + @SerializedName("name") + Object name; + + private Affiliate(Object code, Map extraParams, Object name) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object code; + + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData.Affiliate build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Affiliate( + this.code, this.extraParams, this.name); + } + + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; return this; } - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - public Builder setDepartureAirport(EmptyParam departureAirport) { - this.departureAirport = departureAirport; + /** Affiliate partner code. */ + public Builder setCode(EmptyParam code) { + this.code = code; 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 ChargeUpdateParams.PaymentDetails.Flight.Segment#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Affiliate#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -3756,8 +10160,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Flight.Segment#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Affiliate#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -3767,526 +10171,543 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The flight number associated with the segment. */ - public Builder setFlightNumber(String flightNumber) { - this.flightNumber = flightNumber; - return this; - } - - /** The flight number associated with the segment. */ - public Builder setFlightNumber(EmptyParam flightNumber) { - this.flightNumber = flightNumber; + /** Affiliate partner name. */ + public Builder setName(String name) { + this.name = name; return this; } - /** The fare class for the segment. */ - public Builder setServiceClass( - ChargeUpdateParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { - this.serviceClass = serviceClass; + /** Affiliate partner name. */ + public Builder setName(EmptyParam name) { + this.name = name; 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 - @EqualsAndHashCode(callSuper = false) - 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") - Object bookingNumber; - - /** The lodging category. */ - @SerializedName("category") - Category category; - - /** - * Required. Lodging 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") - Object 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Guest { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 lodging location. */ - @SerializedName("name") - Object name; + /** Required. Guest's full name. */ + @SerializedName("name") + Object name; - /** - * Indicates if the customer did not keep their booking while failing to cancel the - * reservation. - */ - @SerializedName("no_show") - Boolean noShow; + private Guest(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } - /** The number of rooms on the booking. */ - @SerializedName("number_of_rooms") - Long numberOfRooms; + public static Builder builder() { + return new Builder(); + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + public static class Builder { + private Map extraParams; - /** The phone number of the lodging location. */ - @SerializedName("property_phone_number") - Object propertyPhoneNumber; + private Object name; - /** The room class for this purchase. */ - @SerializedName("room_class") - Object roomClass; + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData.Guest build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Guest( + this.extraParams, this.name); + } - /** The number of room nights. */ - @SerializedName("room_nights") - Long roomNights; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Guest#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** The total tax amount associating with the room reservation. */ - @SerializedName("total_room_tax_amount") - Long totalRoomTaxAmount; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Guest#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 total tax amount. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; + /** Required. Guest's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } - private Lodging( - Address address, - Long adults, - Affiliate affiliate, - Object bookingNumber, - Category category, - Long checkinAt, - Long checkoutAt, - Object customerServicePhoneNumber, - Long dailyRoomRateAmount, - Delivery delivery, - List extraCharges, - Map extraParams, - Boolean fireSafetyActCompliance, - Object name, - Boolean noShow, - Long numberOfRooms, - List passengers, - Object propertyPhoneNumber, - Object 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; + /** Required. Guest's full name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Host { + /** Address of the host. */ + @SerializedName("address") + Address address; - public static class Builder { - private Address address; + /** Host's country of domicile. */ + @SerializedName("country_of_domicile") + Object countryOfDomicile; - private Long adults; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Affiliate affiliate; + /** Reference number for the host. */ + @SerializedName("host_reference") + Object hostReference; - private Object bookingNumber; + /** Type of host. */ + @SerializedName("host_type") + HostType hostType; - private Category category; + /** Name of the lodging property or host. */ + @SerializedName("name") + Object name; - private Long checkinAt; + /** Total number of reservations for the host. */ + @SerializedName("number_of_reservations") + Long numberOfReservations; - private Long checkoutAt; + /** Property phone number. */ + @SerializedName("property_phone_number") + Object propertyPhoneNumber; - private Object customerServicePhoneNumber; + /** Host's registration date. */ + @SerializedName("registered_at") + Long registeredAt; - private Long dailyRoomRateAmount; + private Host( + Address address, + Object countryOfDomicile, + Map extraParams, + Object hostReference, + HostType hostType, + Object name, + Long numberOfReservations, + Object propertyPhoneNumber, + Long registeredAt) { + this.address = address; + this.countryOfDomicile = countryOfDomicile; + this.extraParams = extraParams; + this.hostReference = hostReference; + this.hostType = hostType; + this.name = name; + this.numberOfReservations = numberOfReservations; + this.propertyPhoneNumber = propertyPhoneNumber; + this.registeredAt = registeredAt; + } - private Delivery delivery; + public static Builder builder() { + return new Builder(); + } - private List extraCharges; + public static class Builder { + private Address address; - private Map extraParams; + private Object countryOfDomicile; - private Boolean fireSafetyActCompliance; + private Map extraParams; - private Object name; + private Object hostReference; - private Boolean noShow; + private HostType hostType; - private Long numberOfRooms; + private Object name; - private List passengers; + private Long numberOfReservations; - private Object propertyPhoneNumber; + private Object propertyPhoneNumber; - private Object roomClass; + private Long registeredAt; - private Long roomNights; + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData.Host build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Host( + this.address, + this.countryOfDomicile, + this.extraParams, + this.hostReference, + this.hostType, + this.name, + this.numberOfReservations, + this.propertyPhoneNumber, + this.registeredAt); + } - private Long totalRoomTaxAmount; + /** Address of the host. */ + public Builder setAddress( + ChargeUpdateParams.PaymentDetails.LodgingData.Host.Address address) { + this.address = address; + return this; + } - private Long totalTaxAmount; + /** Host's country of domicile. */ + public Builder setCountryOfDomicile(String countryOfDomicile) { + this.countryOfDomicile = countryOfDomicile; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Lodging build() { - return new ChargeUpdateParams.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); - } + /** Host's country of domicile. */ + public Builder setCountryOfDomicile(EmptyParam countryOfDomicile) { + this.countryOfDomicile = countryOfDomicile; + return this; + } - /** The lodging location's address. */ - public Builder setAddress(ChargeUpdateParams.PaymentDetails.Lodging.Address address) { - this.address = address; - 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 ChargeUpdateParams.PaymentDetails.LodgingData.Host#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** The number of adults on the booking. */ - public Builder setAdults(Long adults) { - this.adults = adults; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Host#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** Affiliate details for this purchase. */ - public Builder setAffiliate(ChargeUpdateParams.PaymentDetails.Lodging.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + /** Reference number for the host. */ + public Builder setHostReference(String hostReference) { + this.hostReference = hostReference; + return this; + } - /** The booking number associated with the lodging reservation. */ - public Builder setBookingNumber(String bookingNumber) { - this.bookingNumber = bookingNumber; - return this; - } + /** Reference number for the host. */ + public Builder setHostReference(EmptyParam hostReference) { + this.hostReference = hostReference; + return this; + } - /** The booking number associated with the lodging reservation. */ - public Builder setBookingNumber(EmptyParam bookingNumber) { - this.bookingNumber = bookingNumber; - return this; - } + /** Type of host. */ + public Builder setHostType( + ChargeUpdateParams.PaymentDetails.LodgingData.Host.HostType hostType) { + this.hostType = hostType; + return this; + } - /** The lodging category. */ - public Builder setCategory(ChargeUpdateParams.PaymentDetails.Lodging.Category category) { - this.category = category; - return this; - } + /** Name of the lodging property or host. */ + public Builder setName(String name) { + this.name = name; + return this; + } - /** - * Required. Lodging check-in time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckinAt(Long checkinAt) { - this.checkinAt = checkinAt; - return this; - } + /** Name of the lodging property or host. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckoutAt(Long checkoutAt) { - this.checkoutAt = checkoutAt; - return this; - } + /** Total number of reservations for the host. */ + public Builder setNumberOfReservations(Long numberOfReservations) { + this.numberOfReservations = numberOfReservations; + return this; + } - /** The customer service phone number of the lodging company. */ - public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { - this.customerServicePhoneNumber = customerServicePhoneNumber; - return this; - } + /** Property phone number. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } - /** The customer service phone number of the lodging company. */ - public Builder setCustomerServicePhoneNumber(EmptyParam customerServicePhoneNumber) { - this.customerServicePhoneNumber = customerServicePhoneNumber; - return this; - } + /** Property phone number. */ + public Builder setPropertyPhoneNumber(EmptyParam propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } - /** The daily lodging room rate. */ - public Builder setDailyRoomRateAmount(Long dailyRoomRateAmount) { - this.dailyRoomRateAmount = dailyRoomRateAmount; - return this; + /** Host's registration date. */ + public Builder setRegisteredAt(Long registeredAt) { + this.registeredAt = registeredAt; + return this; + } } - /** Delivery details for this purchase. */ - public Builder setDelivery(ChargeUpdateParams.PaymentDetails.Lodging.Delivery delivery) { - this.delivery = delivery; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; - /** - * 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 - * ChargeUpdateParams.PaymentDetails.Lodging#extraCharges} for the field documentation. - */ - public Builder addExtraCharge( - ChargeUpdateParams.PaymentDetails.Lodging.ExtraCharge element) { - if (this.extraCharges == null) { - this.extraCharges = new ArrayList<>(); - } - this.extraCharges.add(element); - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; - /** - * 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 - * ChargeUpdateParams.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; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map 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 ChargeUpdateParams.PaymentDetails.Lodging#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Lodging#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - 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; - } + public static class Builder { + private Object city; - /** The name of the lodging location. */ - public Builder setName(String name) { - this.name = name; - return this; - } + private Object country; - /** The name of the lodging location. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + private Map extraParams; - /** - * 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; - } + private Object line1; - /** The number of rooms on the booking. */ - public Builder setNumberOfRooms(Long numberOfRooms) { - this.numberOfRooms = numberOfRooms; - return this; - } + private Object line2; - /** - * 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 - * ChargeUpdateParams.PaymentDetails.Lodging#passengers} for the field documentation. - */ - public Builder addPassenger(ChargeUpdateParams.PaymentDetails.Lodging.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.add(element); - return this; - } + private Object postalCode; - /** - * 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 - * ChargeUpdateParams.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; - } + private Object state; - /** The phone number of the lodging location. */ - public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { - this.propertyPhoneNumber = propertyPhoneNumber; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData.Host.Address build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Host.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - /** The phone number of the lodging location. */ - public Builder setPropertyPhoneNumber(EmptyParam propertyPhoneNumber) { - this.propertyPhoneNumber = propertyPhoneNumber; - return this; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** The room class for this purchase. */ - public Builder setRoomClass(String roomClass) { - this.roomClass = roomClass; - return this; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - /** The room class for this purchase. */ - public Builder setRoomClass(EmptyParam roomClass) { - this.roomClass = roomClass; - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** The number of room nights. */ - public Builder setRoomNights(Long roomNights) { - this.roomNights = roomNights; - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - /** The total tax amount associating with the room reservation. */ - public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { - this.totalRoomTaxAmount = totalRoomTaxAmount; - 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 + * ChargeUpdateParams.PaymentDetails.LodgingData.Host.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 + * ChargeUpdateParams.PaymentDetails.LodgingData.Host.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; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } } - /** The total tax amount. */ - public Builder setTotalTaxAmount(Long totalTaxAmount) { - this.totalTaxAmount = totalTaxAmount; - return this; + public enum HostType implements ApiRequestParams.EnumParam { + @SerializedName("hostel") + HOSTEL("hostel"), + + @SerializedName("hotel") + HOTEL("hotel"), + + @SerializedName("owner") + OWNER("owner"), + + @SerializedName("rental_agency") + RENTAL_AGENCY("rental_agency"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + HostType(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - Object city; + public static class Insurance { + /** Required. Price of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - Object country; + /** Currency of the insurance amount. */ + @SerializedName("currency") + Object currency; /** * Map of extra parameters for custom features not available in this client library. The @@ -4298,105 +10719,75 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - Object line1; - - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - Object line2; - - /** ZIP or postal code. */ - @SerializedName("postal_code") - Object postalCode; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; - /** State, county, province, or region. */ - @SerializedName("state") - Object state; + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - private Address( - Object city, - Object country, + private Insurance( + Long amount, + Object currency, Map extraParams, - Object line1, - Object line2, - Object postalCode, - Object state) { - this.city = city; - this.country = country; + Object insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { return new Builder(); } - public static class Builder { - private Object city; - - private Object country; - - private Map extraParams; - - private Object line1; - - private Object line2; - - private Object postalCode; - - private Object state; - - /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Lodging.Address build() { - return new ChargeUpdateParams.PaymentDetails.Lodging.Address( - this.city, - this.country, - this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); - } + public static class Builder { + private Long amount; - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; - return this; + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData.Insurance build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); } - /** City, district, suburb, town, or village. */ - public Builder setCity(EmptyParam city) { - this.city = city; + /** Required. Price of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; return this; } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; return this; } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(EmptyParam country) { - this.country = country; + /** Currency of the insurance amount. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Lodging.Address#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Insurance#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4409,8 +10800,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Lodging.Address#extraParams} for the - * field documentation. + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Insurance#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4420,59 +10811,71 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(EmptyParam line1) { - this.line1 = line1; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; return this; } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + ChargeUpdateParams.PaymentDetails.LodgingData.Insurance.InsuranceType insuranceType) { + this.insuranceType = insuranceType; return this; } + } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(EmptyParam line2) { - this.line2 = line2; - return this; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** ZIP or postal code. */ - public Builder setPostalCode(EmptyParam postalCode) { - this.postalCode = postalCode; - return this; - } + @SerializedName("emergency") + EMERGENCY("emergency"), - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; - } + @SerializedName("medical") + MEDICAL("medical"); - /** State, county, province, or region. */ - public Builder setState(EmptyParam state) { - this.state = state; - return this; + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Total { + /** Required. Total price of the lodging reservation in cents. */ + @SerializedName("amount") + Long amount; + + /** Cash advances in cents. */ + @SerializedName("cash_advances") + Long cashAdvances; + + /** Currency of the total amount. */ + @SerializedName("currency") + Object currency; + + /** Discount details for the lodging. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the lodging. */ + @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. @@ -4483,13 +10886,31 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - Object name; + /** Prepaid amount in cents. */ + @SerializedName("prepaid_amount") + Long prepaidAmount; - private Affiliate(Map extraParams, Object name) { + /** Tax breakdown for the lodging reservation. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + Long cashAdvances, + Object currency, + Discounts discounts, + List extraCharges, + Map extraParams, + Long prepaidAmount, + Tax tax) { + this.amount = amount; + this.cashAdvances = cashAdvances; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.name = name; + this.prepaidAmount = prepaidAmount; + this.tax = tax; } public static Builder builder() { @@ -4497,20 +10918,101 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private Long cashAdvances; + + private Object currency; + + private Discounts discounts; + + private List + extraCharges; + private Map extraParams; - private Object name; + private Long prepaidAmount; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Lodging.Affiliate build() { - return new ChargeUpdateParams.PaymentDetails.Lodging.Affiliate( - this.extraParams, this.name); + public ChargeUpdateParams.PaymentDetails.LodgingData.Total build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Total( + this.amount, + this.cashAdvances, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.prepaidAmount, + this.tax); + } + + /** Required. Total price of the lodging reservation in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Cash advances in cents. */ + public Builder setCashAdvances(Long cashAdvances) { + this.cashAdvances = cashAdvances; + return this; + } + + /** Currency of the total amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency of the total amount. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Discount details for the lodging. */ + public Builder setDiscounts( + ChargeUpdateParams.PaymentDetails.LodgingData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * ChargeUpdateParams.PaymentDetails.LodgingData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + ChargeUpdateParams.PaymentDetails.LodgingData.Total.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 ChargeUpdateParams.PaymentDetails.LodgingData.Total#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 ChargeUpdateParams.PaymentDetails.Lodging.Affiliate#extraParams} for + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Total#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4524,7 +11026,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Lodging.Affiliate#extraParams} for + * map. See {@link ChargeUpdateParams.PaymentDetails.LodgingData.Total#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4535,112 +11037,126 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Prepaid amount in cents. */ + public Builder setPrepaidAmount(Long prepaidAmount) { + this.prepaidAmount = prepaidAmount; return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Tax breakdown for the lodging reservation. */ + public Builder setTax(ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax tax) { + this.tax = tax; return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + Object corporateClientCode; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** Coupon code. */ + @SerializedName("coupon") + Object coupon; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Delivery(Map extraParams, Mode mode, Recipient recipient) { - this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; - } + private Discounts( + Object corporateClientCode, Object coupon, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + } - public static Builder builder() { - return new Builder(); - } + public static Builder builder() { + return new Builder(); + } - public static class Builder { - private Map extraParams; + public static class Builder { + private Object corporateClientCode; - private Mode mode; + private Object coupon; - private Recipient recipient; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Lodging.Delivery build() { - return new ChargeUpdateParams.PaymentDetails.Lodging.Delivery( - this.extraParams, this.mode, this.recipient); - } + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Discounts build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Discounts( + this.corporateClientCode, this.coupon, 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 ChargeUpdateParams.PaymentDetails.Lodging.Delivery#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Lodging.Delivery#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Corporate client discount code. */ + public Builder setCorporateClientCode(EmptyParam corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** Coupon code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } + + /** Coupon code. */ + public Builder setCoupon(EmptyParam coupon) { + this.coupon = coupon; + 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 + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Discounts#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; } - this.extraParams.putAll(map); - return this; - } - - /** The delivery method for the payment. */ - public Builder setMode(ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Mode mode) { - this.mode = mode; - return this; - } - - /** Details of the recipient. */ - public Builder setRecipient( - ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { - this.recipient = recipient; - return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - Object email; + public static class ExtraCharge { + /** Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; /** * Map of extra parameters for custom features not available in this client library. The @@ -4652,20 +11168,14 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - Object name; - - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - Object phone; + /** Type of extra charge. */ + @SerializedName("type") + Type type; - private Recipient( - Object email, Map extraParams, Object name, Object phone) { - this.email = email; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.type = type; } public static Builder builder() { @@ -4673,29 +11183,21 @@ public static Builder builder() { } public static class Builder { - private Object email; + private Long amount; private Map extraParams; - private Object name; - - private Object phone; + private Type type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient build() { - return new ChargeUpdateParams.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; + public ChargeUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(EmptyParam email) { - this.email = email; + /** Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; return this; } @@ -4703,7 +11205,7 @@ public Builder setEmail(EmptyParam email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4718,7 +11220,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for the + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4729,180 +11231,262 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** Type of extra charge. */ + public Builder setType( + ChargeUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge.Type type) { + this.type = type; return this; } + } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("gift_shop") + GIFT_SHOP("gift_shop"), - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } + @SerializedName("laundry") + LAUNDRY("laundry"), - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; + @SerializedName("mini_bar") + MINI_BAR("mini_bar"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("phone") + PHONE("phone"), + + @SerializedName("restaurant") + RESTAURANT("restaurant"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; } } } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), - - @SerializedName("phone") - PHONE("phone"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Indicates whether the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - @SerializedName("post") - POST("post"); + /** Tax details. */ + @SerializedName("taxes") + List taxes; - @Getter(onMethod_ = {@Override}) - private final String value; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - Mode(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static class Builder { + private Map extraParams; - /** - * Required. Full name of the person or entity on the lodging reservation. - */ - @SerializedName("name") - Object name; + private Boolean taxExemptIndicator; - private Passenger(Map extraParams, Object name) { - this.extraParams = extraParams; - this.name = name; - } + private List taxes; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - public static class Builder { - private Map 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 + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.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; + } - private Object name; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.Lodging.Passenger build() { - return new ChargeUpdateParams.PaymentDetails.Lodging.Passenger( - this.extraParams, this.name); - } + /** Indicates whether the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + 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 ChargeUpdateParams.PaymentDetails.Lodging.Passenger#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ChargeUpdateParams.PaymentDetails.Lodging.Passenger#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; } - 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount in cents. */ + @SerializedName("amount") + Long amount; - /** - * Required. Full name of the person or entity on the lodging - * reservation. - */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } - } - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Tax rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + Object type; + + private Tax(Long amount, Map extraParams, Long rate, Object type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - public enum Category implements ApiRequestParams.EnumParam { - @SerializedName("hotel") - HOTEL("hotel"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("vacation_rental") - VACATION_RENTAL("vacation_rental"); + public static class Builder { + private Long amount; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - Category(String value) { - this.value = value; - } - } + private Long rate; - public enum ExtraCharge implements ApiRequestParams.EnumParam { - @SerializedName("gift_shop") - GIFT_SHOP("gift_shop"), + private Object type; - @SerializedName("laundry") - LAUNDRY("laundry"), + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - @SerializedName("mini_bar") - MINI_BAR("mini_bar"), + /** Tax amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - @SerializedName("other") - OTHER("other"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.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; + } - @SerializedName("restaurant") - RESTAURANT("restaurant"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.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; + } - @SerializedName("telephone") - TELEPHONE("telephone"); + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } - ExtraCharge(String value) { - this.value = value; + /** Type of tax applied. */ + public Builder setType(EmptyParam type) { + this.type = type; + return this; + } + } + } } } } diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java index 7c68b8b5907..686751224ce 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionCollectionListParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -52,11 +56,13 @@ public class CustomerBalanceTransactionCollectionListParams extends ApiRequestPa String startingAfter; private CustomerBalanceTransactionCollectionListParams( + Object created, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -69,6 +75,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -82,7 +90,28 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionCollectionListParams build() { return new CustomerBalanceTransactionCollectionListParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionCollectionListParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -169,4 +198,115 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionCollectionListParams.Created build() { + return new CustomerBalanceTransactionCollectionListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionCollectionListParams.Created#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionCollectionListParams.Created#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java index 2177805074e..e2191f7e6da 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionListParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -52,11 +56,13 @@ public class CustomerBalanceTransactionListParams extends ApiRequestParams { String startingAfter; private CustomerBalanceTransactionListParams( + Object created, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -69,6 +75,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -82,7 +90,28 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionListParams build() { return new CustomerBalanceTransactionListParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionListParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -168,4 +197,114 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionListParams.Created build() { + return new CustomerBalanceTransactionListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionListParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionListParams.Created#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java index 5bd309da028..cc2de9dd2d7 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionsParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -52,11 +56,13 @@ public class CustomerBalanceTransactionsParams extends ApiRequestParams { String startingAfter; private CustomerBalanceTransactionsParams( + Object created, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -69,6 +75,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -82,7 +90,28 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionsParams build() { return new CustomerBalanceTransactionsParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionsParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -168,4 +197,114 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionsParams.Created build() { + return new CustomerBalanceTransactionsParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionsParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionsParams.Created#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/InvoicePaymentListParams.java b/src/main/java/com/stripe/param/InvoicePaymentListParams.java index bfc2be62b7e..2a8bef332a1 100644 --- a/src/main/java/com/stripe/param/InvoicePaymentListParams.java +++ b/src/main/java/com/stripe/param/InvoicePaymentListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class InvoicePaymentListParams extends ApiRequestParams { + /** Only return invoice payments that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -64,6 +68,7 @@ public class InvoicePaymentListParams extends ApiRequestParams { Status status; private InvoicePaymentListParams( + Object created, String endingBefore, List expand, Map extraParams, @@ -72,6 +77,7 @@ private InvoicePaymentListParams( Payment payment, String startingAfter, Status status) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -87,6 +93,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -106,6 +114,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public InvoicePaymentListParams build() { return new InvoicePaymentListParams( + this.created, this.endingBefore, this.expand, this.extraParams, @@ -116,6 +125,18 @@ public InvoicePaymentListParams build() { this.status); } + /** Only return invoice payments that were created during the given date interval. */ + public Builder setCreated(InvoicePaymentListParams.Created created) { + this.created = created; + return this; + } + + /** Only return invoice payments that were created during the given date interval. */ + public Builder setCreated(Long created) { + this.created = created; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -218,6 +239,115 @@ public Builder setStatus(InvoicePaymentListParams.Status status) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoicePaymentListParams.Created build() { + return new InvoicePaymentListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoicePaymentListParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoicePaymentListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payment { diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index 74187534b6f..24703f1ed65 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -4550,19 +4550,25 @@ public static class Klarna { @SerializedName("subscriptions") Object subscriptions; + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + @SerializedName("supplementary_purchase_data") + Object supplementaryPurchaseData; + private Klarna( ApiRequestParams.EnumParam captureMethod, Map extraParams, OnDemand onDemand, PreferredLocale preferredLocale, SetupFutureUsage setupFutureUsage, - Object subscriptions) { + Object subscriptions, + Object supplementaryPurchaseData) { this.captureMethod = captureMethod; this.extraParams = extraParams; this.onDemand = onDemand; this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; this.subscriptions = subscriptions; + this.supplementaryPurchaseData = supplementaryPurchaseData; } public static Builder builder() { @@ -4582,6 +4588,8 @@ public static class Builder { private Object subscriptions; + private Object supplementaryPurchaseData; + /** Finalize and obtain parameter instance from this builder. */ public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna build() { return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna( @@ -4590,7 +4598,8 @@ public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna build() { this.onDemand, this.preferredLocale, this.setupFutureUsage, - this.subscriptions); + this.subscriptions, + this.supplementaryPurchaseData); } /** @@ -4765,6 +4774,21 @@ public Builder setSubscriptions( this.subscriptions = subscriptions; return this; } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData + supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData(EmptyParam supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } } @Getter @@ -5228,6 +5252,6558 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SupplementaryPurchaseData { + /** Supplementary bus reservation details. */ + @SerializedName("bus_reservation_details") + Object busReservationDetails; + + /** Supplementary event reservation details. */ + @SerializedName("event_reservation_details") + Object eventReservationDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Supplementary ferry reservation details. */ + @SerializedName("ferry_reservation_details") + Object ferryReservationDetails; + + /** Supplementary insurance details. */ + @SerializedName("insurances") + Object insurances; + + /** Supplementary marketplace seller details. */ + @SerializedName("marketplace_sellers") + Object marketplaceSellers; + + /** Supplementary round trip reservation details. */ + @SerializedName("round_trip_reservation_details") + Object roundTripReservationDetails; + + /** Supplementary train reservation details. */ + @SerializedName("train_reservation_details") + Object trainReservationDetails; + + /** Voucher details, such as a gift card or discount code. */ + @SerializedName("vouchers") + Object vouchers; + + private SupplementaryPurchaseData( + Object busReservationDetails, + Object eventReservationDetails, + Map extraParams, + Object ferryReservationDetails, + Object insurances, + Object marketplaceSellers, + Object roundTripReservationDetails, + Object trainReservationDetails, + Object vouchers) { + this.busReservationDetails = busReservationDetails; + this.eventReservationDetails = eventReservationDetails; + this.extraParams = extraParams; + this.ferryReservationDetails = ferryReservationDetails; + this.insurances = insurances; + this.marketplaceSellers = marketplaceSellers; + this.roundTripReservationDetails = roundTripReservationDetails; + this.trainReservationDetails = trainReservationDetails; + this.vouchers = vouchers; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object busReservationDetails; + + private Object eventReservationDetails; + + private Map extraParams; + + private Object ferryReservationDetails; + + private Object insurances; + + private Object marketplaceSellers; + + private Object roundTripReservationDetails; + + private Object trainReservationDetails; + + private Object vouchers; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData( + this.busReservationDetails, + this.eventReservationDetails, + this.extraParams, + this.ferryReservationDetails, + this.insurances, + this.marketplaceSellers, + this.roundTripReservationDetails, + this.trainReservationDetails, + this.vouchers); + } + + /** + * Add an element to `busReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addBusReservationDetail( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail + element) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `busReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllBusReservationDetail( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + elements) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails(EmptyParam busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** + * Add an element to `eventReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addEventReservationDetail( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail + element) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `eventReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllEventReservationDetail( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + elements) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails(EmptyParam eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `ferryReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFerryReservationDetail( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail + element) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `ferryReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFerryReservationDetail( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + elements) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails(EmptyParam ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } + + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addInsurance( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance + element) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllInsurance( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + elements) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .addAll(elements); + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances(EmptyParam insurances) { + this.insurances = insurances; + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + insurances) { + this.insurances = insurances; + return this; + } + + /** + * Add an element to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addMarketplaceSeller( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller + element) { + if (this.marketplaceSellers == null + || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .add(element); + return this; + } + + /** + * Add all elements to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllMarketplaceSeller( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + elements) { + if (this.marketplaceSellers == null + || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .addAll(elements); + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers(EmptyParam marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** + * Add an element to `roundTripReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addRoundTripReservationDetail( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail + element) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `roundTripReservationDetails` list. A list is initialized for + * the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllRoundTripReservationDetail( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + elements) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + EmptyParam roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } + + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } + + /** + * Add an element to `trainReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addTrainReservationDetail( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail + element) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `trainReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllTrainReservationDetail( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + elements) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails(EmptyParam trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } + + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } + + /** + * Add an element to `vouchers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See + * {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addVoucher( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher + element) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .add(element); + return this; + } + + /** + * Add all elements to `vouchers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllVoucher( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + elements) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); + } + ((List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .addAll(elements); + return this; + } + + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers(EmptyParam vouchers) { + this.vouchers = vouchers; + return this; + } + + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + vouchers) { + this.vouchers = vouchers; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private BusReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; + + private Map extraParams; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure + departure) { + this.departure = departure; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Long departsAt; + + private String departureLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } + + /** Address of the departure location. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } + + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; + + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String familyName; + + private String givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + } + } + + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EventReservationDetail { + /** Indicates if the tickets are digitally checked when entering the venue. */ + @SerializedName("access_controlled_venue") + Boolean accessControlledVenue; + + /** Address of the event. */ + @SerializedName("address") + Address address; + + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** End timestamp of the event. */ + @SerializedName("ends_at") + Long endsAt; + + /** Company selling the ticket. */ + @SerializedName("event_company_name") + String eventCompanyName; + + /** Name of the event. */ + @SerializedName("event_name") + String eventName; + + /** Type of the event. */ + @SerializedName("event_type") + EventType eventType; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this event. */ + @SerializedName("insurances") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances; + + /** Start timestamp of the event. */ + @SerializedName("starts_at") + Long startsAt; + + /** Name of the venue where the event takes place. */ + @SerializedName("venue_name") + String venueName; + + private EventReservationDetail( + Boolean accessControlledVenue, + Address address, + String affiliateName, + Long endsAt, + String eventCompanyName, + String eventName, + EventType eventType, + Map extraParams, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances, + Long startsAt, + String venueName) { + this.accessControlledVenue = accessControlledVenue; + this.address = address; + this.affiliateName = affiliateName; + this.endsAt = endsAt; + this.eventCompanyName = eventCompanyName; + this.eventName = eventName; + this.eventType = eventType; + this.extraParams = extraParams; + this.insurances = insurances; + this.startsAt = startsAt; + this.venueName = venueName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean accessControlledVenue; + + private Address address; + + private String affiliateName; + + private Long endsAt; + + private String eventCompanyName; + + private String eventName; + + private EventType eventType; + + private Map extraParams; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances; + + private Long startsAt; + + private String venueName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail( + this.accessControlledVenue, + this.address, + this.affiliateName, + this.endsAt, + this.eventCompanyName, + this.eventName, + this.eventType, + this.extraParams, + this.insurances, + this.startsAt, + this.venueName); + } + + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; + return this; + } + + /** Address of the event. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address + address) { + this.address = address; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** End timestamp of the event. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } + + /** Company selling the ticket. */ + public Builder setEventCompanyName(String eventCompanyName) { + this.eventCompanyName = eventCompanyName; + return this; + } + + /** Name of the event. */ + public Builder setEventName(String eventName) { + this.eventName = eventName; + return this; + } + + /** Type of the event. */ + public Builder setEventType( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.EventType + eventType) { + this.eventType = eventType; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Start timestamp of the event. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + + /** Name of the venue where the event takes place. */ + public Builder setVenueName(String venueName) { + this.venueName = venueName; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("concert") + CONCERT("concert"), + + @SerializedName("conference") + CONFERENCE("conference"), + + @SerializedName("digital_education") + DIGITAL_EDUCATION("digital_education"), + + @SerializedName("expo") + EXPO("expo"), + + @SerializedName("festival") + FESTIVAL("festival"), + + @SerializedName("in_person_education") + IN_PERSON_EDUCATION("in_person_education"), + + @SerializedName("sport") + SPORT("sport"), + + @SerializedName("tour") + TOUR("tour"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EventType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FerryReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private FerryReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; + + private Map extraParams; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure + departure) { + this.departure = departure; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Long departsAt; + + private String departureLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } + + /** Address of the departure location. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } + + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; + + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String familyName; + + private String givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + } + } + + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSeller { + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 references to line items for purchases with multiple associated sub-sellers. + */ + @SerializedName("line_item_references") + List lineItemReferences; + + /** The address of the selling or delivering merchant. */ + @SerializedName("marketplace_seller_address") + MarketplaceSellerAddress marketplaceSellerAddress; + + /** The name of the marketplace seller. */ + @SerializedName("marketplace_seller_name") + String marketplaceSellerName; + + /** The unique identifier for the marketplace seller. */ + @SerializedName("marketplace_seller_reference") + String marketplaceSellerReference; + + /** The number of transactions the sub-seller completed in the last 12 months. */ + @SerializedName("number_of_transactions") + Long numberOfTransactions; + + /** The category of the product. */ + @SerializedName("product_category") + ProductCategory productCategory; + + /** The date when the seller's account with the marketplace was last logged in. */ + @SerializedName("seller_last_login_at") + Long sellerLastLoginAt; + + /** + * The current rating of the marketplace seller. If the marketplace uses numeric + * ranking, map these to the enum values. + */ + @SerializedName("seller_rating") + SellerRating sellerRating; + + /** The date when the seller's account with the marketplace was created. */ + @SerializedName("seller_registered_at") + Long sellerRegisteredAt; + + /** The date when the seller's account with the marketplace was last updated. */ + @SerializedName("seller_updated_at") + Long sellerUpdatedAt; + + /** + * The references to shipping addresses for purchases with multiple associated + * sub-sellers. + */ + @SerializedName("shipping_references") + List shippingReferences; + + /** + * The accumulated amount of sales transactions made by the sub-merchant or sub-seller + * within the past 12 months in the payment currency. These transactions are in minor + * currency units. + */ + @SerializedName("volume_of_transactions") + Long volumeOfTransactions; + + private MarketplaceSeller( + Map extraParams, + List lineItemReferences, + MarketplaceSellerAddress marketplaceSellerAddress, + String marketplaceSellerName, + String marketplaceSellerReference, + Long numberOfTransactions, + ProductCategory productCategory, + Long sellerLastLoginAt, + SellerRating sellerRating, + Long sellerRegisteredAt, + Long sellerUpdatedAt, + List shippingReferences, + Long volumeOfTransactions) { + this.extraParams = extraParams; + this.lineItemReferences = lineItemReferences; + this.marketplaceSellerAddress = marketplaceSellerAddress; + this.marketplaceSellerName = marketplaceSellerName; + this.marketplaceSellerReference = marketplaceSellerReference; + this.numberOfTransactions = numberOfTransactions; + this.productCategory = productCategory; + this.sellerLastLoginAt = sellerLastLoginAt; + this.sellerRating = sellerRating; + this.sellerRegisteredAt = sellerRegisteredAt; + this.sellerUpdatedAt = sellerUpdatedAt; + this.shippingReferences = shippingReferences; + this.volumeOfTransactions = volumeOfTransactions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List lineItemReferences; + + private MarketplaceSellerAddress marketplaceSellerAddress; + + private String marketplaceSellerName; + + private String marketplaceSellerReference; + + private Long numberOfTransactions; + + private ProductCategory productCategory; + + private Long sellerLastLoginAt; + + private SellerRating sellerRating; + + private Long sellerRegisteredAt; + + private Long sellerUpdatedAt; + + private List shippingReferences; + + private Long volumeOfTransactions; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller( + this.extraParams, + this.lineItemReferences, + this.marketplaceSellerAddress, + this.marketplaceSellerName, + this.marketplaceSellerReference, + this.numberOfTransactions, + this.productCategory, + this.sellerLastLoginAt, + this.sellerRating, + this.sellerRegisteredAt, + this.sellerUpdatedAt, + this.shippingReferences, + this.volumeOfTransactions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `lineItemReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addLineItemReference(String element) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.add(element); + return this; + } + + /** + * Add all elements to `lineItemReferences` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addAllLineItemReference(List elements) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.addAll(elements); + return this; + } + + /** The address of the selling or delivering merchant. */ + public Builder setMarketplaceSellerAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress + marketplaceSellerAddress) { + this.marketplaceSellerAddress = marketplaceSellerAddress; + return this; + } + + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(String marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } + + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(String marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } + + /** The number of transactions the sub-seller completed in the last 12 months. */ + public Builder setNumberOfTransactions(Long numberOfTransactions) { + this.numberOfTransactions = numberOfTransactions; + return this; + } + + /** The category of the product. */ + public Builder setProductCategory( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.ProductCategory + productCategory) { + this.productCategory = productCategory; + return this; + } + + /** The date when the seller's account with the marketplace was last logged in. */ + public Builder setSellerLastLoginAt(Long sellerLastLoginAt) { + this.sellerLastLoginAt = sellerLastLoginAt; + return this; + } + + /** + * The current rating of the marketplace seller. If the marketplace uses numeric + * ranking, map these to the enum values. + */ + public Builder setSellerRating( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.SellerRating + sellerRating) { + this.sellerRating = sellerRating; + return this; + } + + /** The date when the seller's account with the marketplace was created. */ + public Builder setSellerRegisteredAt(Long sellerRegisteredAt) { + this.sellerRegisteredAt = sellerRegisteredAt; + return this; + } + + /** The date when the seller's account with the marketplace was last updated. */ + public Builder setSellerUpdatedAt(Long sellerUpdatedAt) { + this.sellerUpdatedAt = sellerUpdatedAt; + return this; + } + + /** + * Add an element to `shippingReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addShippingReference(String element) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.add(element); + return this; + } + + /** + * Add all elements to `shippingReferences` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addAllShippingReference(List elements) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.addAll(elements); + return this; + } + + /** + * The accumulated amount of sales transactions made by the sub-merchant or + * sub-seller within the past 12 months in the payment currency. These transactions + * are in minor currency units. + */ + public Builder setVolumeOfTransactions(Long volumeOfTransactions) { + this.volumeOfTransactions = volumeOfTransactions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSellerAddress { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private MarketplaceSellerAddress( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#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 postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + + public enum ProductCategory implements ApiRequestParams.EnumParam { + @SerializedName("accessories") + ACCESSORIES("accessories"), + + @SerializedName("appliances") + APPLIANCES("appliances"), + + @SerializedName("apps_and_games") + APPS_AND_GAMES("apps_and_games"), + + @SerializedName("arts_crafts_and_sewing") + ARTS_CRAFTS_AND_SEWING("arts_crafts_and_sewing"), + + @SerializedName("automotive") + AUTOMOTIVE("automotive"), + + @SerializedName("baby") + BABY("baby"), + + @SerializedName("baby_clothing") + BABY_CLOTHING("baby_clothing"), + + @SerializedName("bags_and_purses") + BAGS_AND_PURSES("bags_and_purses"), + + @SerializedName("beauty") + BEAUTY("beauty"), + + @SerializedName("books") + BOOKS("books"), + + @SerializedName("cds_and_vinyl") + CDS_AND_VINYL("cds_and_vinyl"), + + @SerializedName("cell_phones_and_accessories") + CELL_PHONES_AND_ACCESSORIES("cell_phones_and_accessories"), + + @SerializedName("collectibles_and_fine_arts") + COLLECTIBLES_AND_FINE_ARTS("collectibles_and_fine_arts"), + + @SerializedName("digital_music") + DIGITAL_MUSIC("digital_music"), + + @SerializedName("electronics") + ELECTRONICS("electronics"), + + @SerializedName("grocery_and_gourmet_food") + GROCERY_AND_GOURMET_FOOD("grocery_and_gourmet_food"), + + @SerializedName("handmade") + HANDMADE("handmade"), + + @SerializedName("health_and_personal_care") + HEALTH_AND_PERSONAL_CARE("health_and_personal_care"), + + @SerializedName("home_and_kitchen") + HOME_AND_KITCHEN("home_and_kitchen"), + + @SerializedName("industrial_and_scientific") + INDUSTRIAL_AND_SCIENTIFIC("industrial_and_scientific"), + + @SerializedName("luggage_and_travel_gear") + LUGGAGE_AND_TRAVEL_GEAR("luggage_and_travel_gear"), + + @SerializedName("magazine_subscriptions") + MAGAZINE_SUBSCRIPTIONS("magazine_subscriptions"), + + @SerializedName("men_clothing") + MEN_CLOTHING("men_clothing"), + + @SerializedName("musical_instruments") + MUSICAL_INSTRUMENTS("musical_instruments"), + + @SerializedName("office_products") + OFFICE_PRODUCTS("office_products"), + + @SerializedName("patio_lawn_and_garden") + PATIO_LAWN_AND_GARDEN("patio_lawn_and_garden"), + + @SerializedName("pet_supplies") + PET_SUPPLIES("pet_supplies"), + + @SerializedName("shoes") + SHOES("shoes"), + + @SerializedName("software") + SOFTWARE("software"), + + @SerializedName("sports_and_outdoors") + SPORTS_AND_OUTDOORS("sports_and_outdoors"), + + @SerializedName("tools_and_home_improvement") + TOOLS_AND_HOME_IMPROVEMENT("tools_and_home_improvement"), + + @SerializedName("toys_and_games") + TOYS_AND_GAMES("toys_and_games"), + + @SerializedName("video_games") + VIDEO_GAMES("video_games"), + + @SerializedName("women_clothing") + WOMEN_CLOTHING("women_clothing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductCategory(String value) { + this.value = value; + } + } + + public enum SellerRating implements ApiRequestParams.EnumParam { + @SerializedName("high") + HIGH("high"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("medium") + MEDIUM("medium"), + + @SerializedName("very_high") + VERY_HIGH("very_high"), + + @SerializedName("very_low") + VERY_LOW("very_low"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SellerRating(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RoundTripReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private RoundTripReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; + + private Map extraParams; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure + departure) { + this.departure = departure; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Long departsAt; + + private String departureLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } + + /** Address of the departure location. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure + .Address + address) { + this.address = address; + return this; + } + + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; + + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String familyName; + + private String givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + } + } + + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TrainReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private TrainReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances, + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; + + private Map extraParams; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances; + + private List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure + departure) { + this.departure = departure; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Long departsAt; + + private String departureLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } + + /** Address of the departure location. */ + public Builder setAddress( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } + + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; + + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String familyName; + + private String givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + } + } + + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Voucher { + /** Name of associated or partner company for this voucher. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** The voucher validity end time. */ + @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; + + /** The voucher validity start time. */ + @SerializedName("starts_at") + Long startsAt; + + /** The issuer or provider of this voucher. */ + @SerializedName("voucher_company") + String voucherCompany; + + /** The name or reference to identify the voucher. */ + @SerializedName("voucher_name") + String voucherName; + + /** The type of this voucher. */ + @SerializedName("voucher_type") + VoucherType voucherType; + + private Voucher( + String affiliateName, + Long endsAt, + Map extraParams, + Long startsAt, + String voucherCompany, + String voucherName, + VoucherType voucherType) { + this.affiliateName = affiliateName; + this.endsAt = endsAt; + this.extraParams = extraParams; + this.startsAt = startsAt; + this.voucherCompany = voucherCompany; + this.voucherName = voucherName; + this.voucherType = voucherType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String affiliateName; + + private Long endsAt; + + private Map extraParams; + + private Long startsAt; + + private String voucherCompany; + + private String voucherName; + + private VoucherType voucherType; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher( + this.affiliateName, + this.endsAt, + this.extraParams, + this.startsAt, + this.voucherCompany, + this.voucherName, + this.voucherType); + } + + /** Name of associated or partner company for this voucher. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** The voucher validity end time. */ + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#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 voucher validity start time. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + + /** The issuer or provider of this voucher. */ + public Builder setVoucherCompany(String voucherCompany) { + this.voucherCompany = voucherCompany; + return this; + } + + /** The name or reference to identify the voucher. */ + public Builder setVoucherName(String voucherName) { + this.voucherName = voucherName; + return this; + } + + /** The type of this voucher. */ + public Builder setVoucherType( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher.VoucherType + voucherType) { + this.voucherType = voucherType; + return this; + } + } + + public enum VoucherType implements ApiRequestParams.EnumParam { + @SerializedName("digital_product") + DIGITAL_PRODUCT("digital_product"), + + @SerializedName("discount") + DISCOUNT("discount"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("physical_product") + PHYSICAL_PRODUCT("physical_product"), + + @SerializedName("services") + SERVICES("services"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VoucherType(String value) { + this.value = value; + } + } + } + } + public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("manual") MANUAL("manual"); diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index 79813e0a58e..746ed45a3a5 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -5022,19 +5022,25 @@ public static class Klarna { @SerializedName("subscriptions") Object subscriptions; + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + @SerializedName("supplementary_purchase_data") + Object supplementaryPurchaseData; + private Klarna( ApiRequestParams.EnumParam captureMethod, Map extraParams, OnDemand onDemand, PreferredLocale preferredLocale, SetupFutureUsage setupFutureUsage, - Object subscriptions) { + Object subscriptions, + Object supplementaryPurchaseData) { this.captureMethod = captureMethod; this.extraParams = extraParams; this.onDemand = onDemand; this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; this.subscriptions = subscriptions; + this.supplementaryPurchaseData = supplementaryPurchaseData; } public static Builder builder() { @@ -5054,6 +5060,8 @@ public static class Builder { private Object subscriptions; + private Object supplementaryPurchaseData; + /** Finalize and obtain parameter instance from this builder. */ public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna build() { return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna( @@ -5062,7 +5070,8 @@ public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna build() { this.onDemand, this.preferredLocale, this.setupFutureUsage, - this.subscriptions); + this.subscriptions, + this.supplementaryPurchaseData); } /** @@ -5237,6 +5246,21 @@ public Builder setSubscriptions( this.subscriptions = subscriptions; return this; } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData + supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData(EmptyParam supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } } @Getter @@ -5725,6 +5749,7213 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SupplementaryPurchaseData { + /** Supplementary bus reservation details. */ + @SerializedName("bus_reservation_details") + Object busReservationDetails; + + /** Supplementary event reservation details. */ + @SerializedName("event_reservation_details") + Object eventReservationDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Supplementary ferry reservation details. */ + @SerializedName("ferry_reservation_details") + Object ferryReservationDetails; + + /** Supplementary insurance details. */ + @SerializedName("insurances") + Object insurances; + + /** Supplementary marketplace seller details. */ + @SerializedName("marketplace_sellers") + Object marketplaceSellers; + + /** Supplementary round trip reservation details. */ + @SerializedName("round_trip_reservation_details") + Object roundTripReservationDetails; + + /** Supplementary train reservation details. */ + @SerializedName("train_reservation_details") + Object trainReservationDetails; + + /** Voucher details, such as a gift card or discount code. */ + @SerializedName("vouchers") + Object vouchers; + + private SupplementaryPurchaseData( + Object busReservationDetails, + Object eventReservationDetails, + Map extraParams, + Object ferryReservationDetails, + Object insurances, + Object marketplaceSellers, + Object roundTripReservationDetails, + Object trainReservationDetails, + Object vouchers) { + this.busReservationDetails = busReservationDetails; + this.eventReservationDetails = eventReservationDetails; + this.extraParams = extraParams; + this.ferryReservationDetails = ferryReservationDetails; + this.insurances = insurances; + this.marketplaceSellers = marketplaceSellers; + this.roundTripReservationDetails = roundTripReservationDetails; + this.trainReservationDetails = trainReservationDetails; + this.vouchers = vouchers; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object busReservationDetails; + + private Object eventReservationDetails; + + private Map extraParams; + + private Object ferryReservationDetails; + + private Object insurances; + + private Object marketplaceSellers; + + private Object roundTripReservationDetails; + + private Object trainReservationDetails; + + private Object vouchers; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData( + this.busReservationDetails, + this.eventReservationDetails, + this.extraParams, + this.ferryReservationDetails, + this.insurances, + this.marketplaceSellers, + this.roundTripReservationDetails, + this.trainReservationDetails, + this.vouchers); + } + + /** + * Add an element to `busReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addBusReservationDetail( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail + element) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `busReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllBusReservationDetail( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + elements) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails(EmptyParam busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** + * Add an element to `eventReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addEventReservationDetail( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail + element) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `eventReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllEventReservationDetail( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + elements) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails(EmptyParam eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `ferryReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFerryReservationDetail( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail + element) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `ferryReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFerryReservationDetail( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + elements) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails(EmptyParam ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } + + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addInsurance( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance + element) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllInsurance( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + elements) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .addAll(elements); + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances(EmptyParam insurances) { + this.insurances = insurances; + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + insurances) { + this.insurances = insurances; + return this; + } + + /** + * Add an element to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addMarketplaceSeller( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller + element) { + if (this.marketplaceSellers == null + || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .add(element); + return this; + } + + /** + * Add all elements to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllMarketplaceSeller( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + elements) { + if (this.marketplaceSellers == null + || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .addAll(elements); + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers(EmptyParam marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** + * Add an element to `roundTripReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addRoundTripReservationDetail( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail + element) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `roundTripReservationDetails` list. A list is initialized for + * the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllRoundTripReservationDetail( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + elements) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + EmptyParam roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } + + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } + + /** + * Add an element to `trainReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addTrainReservationDetail( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail + element) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `trainReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllTrainReservationDetail( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + elements) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails(EmptyParam trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } + + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } + + /** + * Add an element to `vouchers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See + * {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addVoucher( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher + element) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .add(element); + return this; + } + + /** + * Add all elements to `vouchers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllVoucher( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + elements) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); + } + ((List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .addAll(elements); + return this; + } + + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers(EmptyParam vouchers) { + this.vouchers = vouchers; + return this; + } + + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + vouchers) { + this.vouchers = vouchers; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Currency. */ + @SerializedName("currency") + Object currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private BusReservationDetail( + Object affiliateName, + Arrival arrival, + Object carrierName, + Object currency, + Departure departure, + Map extraParams, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object affiliateName; + + private Arrival arrival; + + private Object carrierName; + + private Object currency; + + private Departure departure; + + private Map extraParams; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure + departure) { + this.departure = departure; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Object arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client + * library. The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Long departsAt; + + private Object departureLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } + + /** Address of the departure location. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } + + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client + * library. The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; + + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object familyName; + + private Object givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + } + } + + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EventReservationDetail { + /** Indicates if the tickets are digitally checked when entering the venue. */ + @SerializedName("access_controlled_venue") + Boolean accessControlledVenue; + + /** Address of the event. */ + @SerializedName("address") + Address address; + + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** End timestamp of the event. */ + @SerializedName("ends_at") + Long endsAt; + + /** Company selling the ticket. */ + @SerializedName("event_company_name") + Object eventCompanyName; + + /** Name of the event. */ + @SerializedName("event_name") + Object eventName; + + /** Type of the event. */ + @SerializedName("event_type") + EventType eventType; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this event. */ + @SerializedName("insurances") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances; + + /** Start timestamp of the event. */ + @SerializedName("starts_at") + Long startsAt; + + /** Name of the venue where the event takes place. */ + @SerializedName("venue_name") + Object venueName; + + private EventReservationDetail( + Boolean accessControlledVenue, + Address address, + Object affiliateName, + Long endsAt, + Object eventCompanyName, + Object eventName, + EventType eventType, + Map extraParams, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances, + Long startsAt, + Object venueName) { + this.accessControlledVenue = accessControlledVenue; + this.address = address; + this.affiliateName = affiliateName; + this.endsAt = endsAt; + this.eventCompanyName = eventCompanyName; + this.eventName = eventName; + this.eventType = eventType; + this.extraParams = extraParams; + this.insurances = insurances; + this.startsAt = startsAt; + this.venueName = venueName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean accessControlledVenue; + + private Address address; + + private Object affiliateName; + + private Long endsAt; + + private Object eventCompanyName; + + private Object eventName; + + private EventType eventType; + + private Map extraParams; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances; + + private Long startsAt; + + private Object venueName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail( + this.accessControlledVenue, + this.address, + this.affiliateName, + this.endsAt, + this.eventCompanyName, + this.eventName, + this.eventType, + this.extraParams, + this.insurances, + this.startsAt, + this.venueName); + } + + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; + return this; + } + + /** Address of the event. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address + address) { + this.address = address; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** End timestamp of the event. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } + + /** Company selling the ticket. */ + public Builder setEventCompanyName(String eventCompanyName) { + this.eventCompanyName = eventCompanyName; + return this; + } + + /** Company selling the ticket. */ + public Builder setEventCompanyName(EmptyParam eventCompanyName) { + this.eventCompanyName = eventCompanyName; + return this; + } + + /** Name of the event. */ + public Builder setEventName(String eventName) { + this.eventName = eventName; + return this; + } + + /** Name of the event. */ + public Builder setEventName(EmptyParam eventName) { + this.eventName = eventName; + return this; + } + + /** Type of the event. */ + public Builder setEventType( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.EventType + eventType) { + this.eventType = eventType; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Start timestamp of the event. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + + /** Name of the venue where the event takes place. */ + public Builder setVenueName(String venueName) { + this.venueName = venueName; + return this; + } + + /** Name of the venue where the event takes place. */ + public Builder setVenueName(EmptyParam venueName) { + this.venueName = venueName; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("concert") + CONCERT("concert"), + + @SerializedName("conference") + CONFERENCE("conference"), + + @SerializedName("digital_education") + DIGITAL_EDUCATION("digital_education"), + + @SerializedName("expo") + EXPO("expo"), + + @SerializedName("festival") + FESTIVAL("festival"), + + @SerializedName("in_person_education") + IN_PERSON_EDUCATION("in_person_education"), + + @SerializedName("sport") + SPORT("sport"), + + @SerializedName("tour") + TOUR("tour"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EventType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FerryReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Currency. */ + @SerializedName("currency") + Object currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private FerryReservationDetail( + Object affiliateName, + Arrival arrival, + Object carrierName, + Object currency, + Departure departure, + Map extraParams, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object affiliateName; + + private Arrival arrival; + + private Object carrierName; + + private Object currency; + + private Departure departure; + + private Map extraParams; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure + departure) { + this.departure = departure; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Object arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client + * library. The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Long departsAt; + + private Object departureLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } + + /** Address of the departure location. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } + + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client + * library. The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; + + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object familyName; + + private Object givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + } + } + + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSeller { + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 references to line items for purchases with multiple associated sub-sellers. + */ + @SerializedName("line_item_references") + List lineItemReferences; + + /** The address of the selling or delivering merchant. */ + @SerializedName("marketplace_seller_address") + MarketplaceSellerAddress marketplaceSellerAddress; + + /** The name of the marketplace seller. */ + @SerializedName("marketplace_seller_name") + Object marketplaceSellerName; + + /** The unique identifier for the marketplace seller. */ + @SerializedName("marketplace_seller_reference") + Object marketplaceSellerReference; + + /** The number of transactions the sub-seller completed in the last 12 months. */ + @SerializedName("number_of_transactions") + Long numberOfTransactions; + + /** The category of the product. */ + @SerializedName("product_category") + ProductCategory productCategory; + + /** The date when the seller's account with the marketplace was last logged in. */ + @SerializedName("seller_last_login_at") + Long sellerLastLoginAt; + + /** + * The current rating of the marketplace seller. If the marketplace uses numeric + * ranking, map these to the enum values. + */ + @SerializedName("seller_rating") + SellerRating sellerRating; + + /** The date when the seller's account with the marketplace was created. */ + @SerializedName("seller_registered_at") + Long sellerRegisteredAt; + + /** The date when the seller's account with the marketplace was last updated. */ + @SerializedName("seller_updated_at") + Long sellerUpdatedAt; + + /** + * The references to shipping addresses for purchases with multiple associated + * sub-sellers. + */ + @SerializedName("shipping_references") + List shippingReferences; + + /** + * The accumulated amount of sales transactions made by the sub-merchant or sub-seller + * within the past 12 months in the payment currency. These transactions are in minor + * currency units. + */ + @SerializedName("volume_of_transactions") + Long volumeOfTransactions; + + private MarketplaceSeller( + Map extraParams, + List lineItemReferences, + MarketplaceSellerAddress marketplaceSellerAddress, + Object marketplaceSellerName, + Object marketplaceSellerReference, + Long numberOfTransactions, + ProductCategory productCategory, + Long sellerLastLoginAt, + SellerRating sellerRating, + Long sellerRegisteredAt, + Long sellerUpdatedAt, + List shippingReferences, + Long volumeOfTransactions) { + this.extraParams = extraParams; + this.lineItemReferences = lineItemReferences; + this.marketplaceSellerAddress = marketplaceSellerAddress; + this.marketplaceSellerName = marketplaceSellerName; + this.marketplaceSellerReference = marketplaceSellerReference; + this.numberOfTransactions = numberOfTransactions; + this.productCategory = productCategory; + this.sellerLastLoginAt = sellerLastLoginAt; + this.sellerRating = sellerRating; + this.sellerRegisteredAt = sellerRegisteredAt; + this.sellerUpdatedAt = sellerUpdatedAt; + this.shippingReferences = shippingReferences; + this.volumeOfTransactions = volumeOfTransactions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List lineItemReferences; + + private MarketplaceSellerAddress marketplaceSellerAddress; + + private Object marketplaceSellerName; + + private Object marketplaceSellerReference; + + private Long numberOfTransactions; + + private ProductCategory productCategory; + + private Long sellerLastLoginAt; + + private SellerRating sellerRating; + + private Long sellerRegisteredAt; + + private Long sellerUpdatedAt; + + private List shippingReferences; + + private Long volumeOfTransactions; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller( + this.extraParams, + this.lineItemReferences, + this.marketplaceSellerAddress, + this.marketplaceSellerName, + this.marketplaceSellerReference, + this.numberOfTransactions, + this.productCategory, + this.sellerLastLoginAt, + this.sellerRating, + this.sellerRegisteredAt, + this.sellerUpdatedAt, + this.shippingReferences, + this.volumeOfTransactions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `lineItemReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addLineItemReference(String element) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.add(element); + return this; + } + + /** + * Add all elements to `lineItemReferences` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addAllLineItemReference(List elements) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.addAll(elements); + return this; + } + + /** The address of the selling or delivering merchant. */ + public Builder setMarketplaceSellerAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress + marketplaceSellerAddress) { + this.marketplaceSellerAddress = marketplaceSellerAddress; + return this; + } + + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(String marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } + + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(EmptyParam marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } + + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(String marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } + + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference( + EmptyParam marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } + + /** The number of transactions the sub-seller completed in the last 12 months. */ + public Builder setNumberOfTransactions(Long numberOfTransactions) { + this.numberOfTransactions = numberOfTransactions; + return this; + } + + /** The category of the product. */ + public Builder setProductCategory( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.ProductCategory + productCategory) { + this.productCategory = productCategory; + return this; + } + + /** The date when the seller's account with the marketplace was last logged in. */ + public Builder setSellerLastLoginAt(Long sellerLastLoginAt) { + this.sellerLastLoginAt = sellerLastLoginAt; + return this; + } + + /** + * The current rating of the marketplace seller. If the marketplace uses numeric + * ranking, map these to the enum values. + */ + public Builder setSellerRating( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.SellerRating + sellerRating) { + this.sellerRating = sellerRating; + return this; + } + + /** The date when the seller's account with the marketplace was created. */ + public Builder setSellerRegisteredAt(Long sellerRegisteredAt) { + this.sellerRegisteredAt = sellerRegisteredAt; + return this; + } + + /** The date when the seller's account with the marketplace was last updated. */ + public Builder setSellerUpdatedAt(Long sellerUpdatedAt) { + this.sellerUpdatedAt = sellerUpdatedAt; + return this; + } + + /** + * Add an element to `shippingReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addShippingReference(String element) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.add(element); + return this; + } + + /** + * Add all elements to `shippingReferences` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addAllShippingReference(List elements) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.addAll(elements); + return this; + } + + /** + * The accumulated amount of sales transactions made by the sub-merchant or + * sub-seller within the past 12 months in the payment currency. These transactions + * are in minor currency units. + */ + public Builder setVolumeOfTransactions(Long volumeOfTransactions) { + this.volumeOfTransactions = volumeOfTransactions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSellerAddress { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private MarketplaceSellerAddress( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#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 postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + + public enum ProductCategory implements ApiRequestParams.EnumParam { + @SerializedName("accessories") + ACCESSORIES("accessories"), + + @SerializedName("appliances") + APPLIANCES("appliances"), + + @SerializedName("apps_and_games") + APPS_AND_GAMES("apps_and_games"), + + @SerializedName("arts_crafts_and_sewing") + ARTS_CRAFTS_AND_SEWING("arts_crafts_and_sewing"), + + @SerializedName("automotive") + AUTOMOTIVE("automotive"), + + @SerializedName("baby") + BABY("baby"), + + @SerializedName("baby_clothing") + BABY_CLOTHING("baby_clothing"), + + @SerializedName("bags_and_purses") + BAGS_AND_PURSES("bags_and_purses"), + + @SerializedName("beauty") + BEAUTY("beauty"), + + @SerializedName("books") + BOOKS("books"), + + @SerializedName("cds_and_vinyl") + CDS_AND_VINYL("cds_and_vinyl"), + + @SerializedName("cell_phones_and_accessories") + CELL_PHONES_AND_ACCESSORIES("cell_phones_and_accessories"), + + @SerializedName("collectibles_and_fine_arts") + COLLECTIBLES_AND_FINE_ARTS("collectibles_and_fine_arts"), + + @SerializedName("digital_music") + DIGITAL_MUSIC("digital_music"), + + @SerializedName("electronics") + ELECTRONICS("electronics"), + + @SerializedName("grocery_and_gourmet_food") + GROCERY_AND_GOURMET_FOOD("grocery_and_gourmet_food"), + + @SerializedName("handmade") + HANDMADE("handmade"), + + @SerializedName("health_and_personal_care") + HEALTH_AND_PERSONAL_CARE("health_and_personal_care"), + + @SerializedName("home_and_kitchen") + HOME_AND_KITCHEN("home_and_kitchen"), + + @SerializedName("industrial_and_scientific") + INDUSTRIAL_AND_SCIENTIFIC("industrial_and_scientific"), + + @SerializedName("luggage_and_travel_gear") + LUGGAGE_AND_TRAVEL_GEAR("luggage_and_travel_gear"), + + @SerializedName("magazine_subscriptions") + MAGAZINE_SUBSCRIPTIONS("magazine_subscriptions"), + + @SerializedName("men_clothing") + MEN_CLOTHING("men_clothing"), + + @SerializedName("musical_instruments") + MUSICAL_INSTRUMENTS("musical_instruments"), + + @SerializedName("office_products") + OFFICE_PRODUCTS("office_products"), + + @SerializedName("patio_lawn_and_garden") + PATIO_LAWN_AND_GARDEN("patio_lawn_and_garden"), + + @SerializedName("pet_supplies") + PET_SUPPLIES("pet_supplies"), + + @SerializedName("shoes") + SHOES("shoes"), + + @SerializedName("software") + SOFTWARE("software"), + + @SerializedName("sports_and_outdoors") + SPORTS_AND_OUTDOORS("sports_and_outdoors"), + + @SerializedName("tools_and_home_improvement") + TOOLS_AND_HOME_IMPROVEMENT("tools_and_home_improvement"), + + @SerializedName("toys_and_games") + TOYS_AND_GAMES("toys_and_games"), + + @SerializedName("video_games") + VIDEO_GAMES("video_games"), + + @SerializedName("women_clothing") + WOMEN_CLOTHING("women_clothing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductCategory(String value) { + this.value = value; + } + } + + public enum SellerRating implements ApiRequestParams.EnumParam { + @SerializedName("high") + HIGH("high"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("medium") + MEDIUM("medium"), + + @SerializedName("very_high") + VERY_HIGH("very_high"), + + @SerializedName("very_low") + VERY_LOW("very_low"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SellerRating(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RoundTripReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Currency. */ + @SerializedName("currency") + Object currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private RoundTripReservationDetail( + Object affiliateName, + Arrival arrival, + Object carrierName, + Object currency, + Departure departure, + Map extraParams, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object affiliateName; + + private Arrival arrival; + + private Object carrierName; + + private Object currency; + + private Departure departure; + + private Map extraParams; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure + departure) { + this.departure = departure; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Object arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client + * library. The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Long departsAt; + + private Object departureLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } + + /** Address of the departure location. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure + .Address + address) { + this.address = address; + return this; + } + + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client + * library. The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; + + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object familyName; + + private Object givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + } + } + + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TrainReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Currency. */ + @SerializedName("currency") + Object currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private TrainReservationDetail( + Object affiliateName, + Arrival arrival, + Object carrierName, + Object currency, + Departure departure, + Map extraParams, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances, + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object affiliateName; + + private Arrival arrival; + + private Object carrierName; + + private Object currency; + + private Departure departure; + + private Map extraParams; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances; + + private List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure + departure) { + this.departure = departure; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Object arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client + * library. The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-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 Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Long departsAt; + + private Object departureLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } + + /** Address of the departure location. */ + public Builder setAddress( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } + + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client + * library. The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object postalCode; + + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if + * the key is a root-level field (serialized) name in this param object. + * Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance + .InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; + + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object familyName; + + private Object givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + } + } + + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Voucher { + /** Name of associated or partner company for this voucher. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** The voucher validity end time. */ + @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; + + /** The voucher validity start time. */ + @SerializedName("starts_at") + Long startsAt; + + /** The issuer or provider of this voucher. */ + @SerializedName("voucher_company") + Object voucherCompany; + + /** The name or reference to identify the voucher. */ + @SerializedName("voucher_name") + Object voucherName; + + /** The type of this voucher. */ + @SerializedName("voucher_type") + VoucherType voucherType; + + private Voucher( + Object affiliateName, + Long endsAt, + Map extraParams, + Long startsAt, + Object voucherCompany, + Object voucherName, + VoucherType voucherType) { + this.affiliateName = affiliateName; + this.endsAt = endsAt; + this.extraParams = extraParams; + this.startsAt = startsAt; + this.voucherCompany = voucherCompany; + this.voucherName = voucherName; + this.voucherType = voucherType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object affiliateName; + + private Long endsAt; + + private Map extraParams; + + private Long startsAt; + + private Object voucherCompany; + + private Object voucherName; + + private VoucherType voucherType; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher( + this.affiliateName, + this.endsAt, + this.extraParams, + this.startsAt, + this.voucherCompany, + this.voucherName, + this.voucherType); + } + + /** Name of associated or partner company for this voucher. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for this voucher. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** The voucher validity end time. */ + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#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 voucher validity start time. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + + /** The issuer or provider of this voucher. */ + public Builder setVoucherCompany(String voucherCompany) { + this.voucherCompany = voucherCompany; + return this; + } + + /** The issuer or provider of this voucher. */ + public Builder setVoucherCompany(EmptyParam voucherCompany) { + this.voucherCompany = voucherCompany; + return this; + } + + /** The name or reference to identify the voucher. */ + public Builder setVoucherName(String voucherName) { + this.voucherName = voucherName; + return this; + } + + /** The name or reference to identify the voucher. */ + public Builder setVoucherName(EmptyParam voucherName) { + this.voucherName = voucherName; + return this; + } + + /** The type of this voucher. */ + public Builder setVoucherType( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher.VoucherType + voucherType) { + this.voucherType = voucherType; + return this; + } + } + + public enum VoucherType implements ApiRequestParams.EnumParam { + @SerializedName("digital_product") + DIGITAL_PRODUCT("digital_product"), + + @SerializedName("discount") + DISCOUNT("discount"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("physical_product") + PHYSICAL_PRODUCT("physical_product"), + + @SerializedName("services") + SERVICES("services"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VoucherType(String value) { + this.value = value; + } + } + } + } + public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("manual") MANUAL("manual"); diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index d47011683a2..8eee04c6b65 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -1934,6 +1934,10 @@ public static class PaymentDetails { @SerializedName("car_rental") CarRental carRental; + /** Car rental data for this PaymentIntent. */ + @SerializedName("car_rental_data") + Object carRentalData; + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -1960,10 +1964,18 @@ public static class PaymentDetails { @SerializedName("flight") Flight flight; + /** Flight data for this PaymentIntent. */ + @SerializedName("flight_data") + Object flightData; + /** Lodging reservation details for this PaymentIntent. */ @SerializedName("lodging") Lodging lodging; + /** Lodging data for this PaymentIntent. */ + @SerializedName("lodging_data") + Object lodgingData; + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -1985,19 +1997,25 @@ public static class PaymentDetails { private PaymentDetails( CarRental carRental, + Object carRentalData, Object customerReference, EventDetails eventDetails, Map extraParams, Flight flight, + Object flightData, Lodging lodging, + Object lodgingData, Object orderReference, Subscription subscription) { this.carRental = carRental; + this.carRentalData = carRentalData; this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; this.flight = flight; + this.flightData = flightData; this.lodging = lodging; + this.lodgingData = lodgingData; this.orderReference = orderReference; this.subscription = subscription; } @@ -2009,6 +2027,8 @@ public static Builder builder() { public static class Builder { private CarRental carRental; + private Object carRentalData; + private Object customerReference; private EventDetails eventDetails; @@ -2017,8 +2037,12 @@ public static class Builder { private Flight flight; + private Object flightData; + private Lodging lodging; + private Object lodgingData; + private Object orderReference; private Subscription subscription; @@ -2027,11 +2051,14 @@ public static class Builder { public PaymentIntentCaptureParams.PaymentDetails build() { return new PaymentIntentCaptureParams.PaymentDetails( this.carRental, + this.carRentalData, this.customerReference, this.eventDetails, this.extraParams, this.flight, + this.flightData, this.lodging, + this.lodgingData, this.orderReference, this.subscription); } @@ -2042,6 +2069,53 @@ public Builder setCarRental(PaymentIntentCaptureParams.PaymentDetails.CarRental return this; } + /** + * Add an element to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCarRentalData( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData element) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = + new ArrayList(); + } + ((List) this.carRentalData) + .add(element); + return this; + } + + /** + * Add all elements to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCarRentalData( + List elements) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = + new ArrayList(); + } + ((List) this.carRentalData) + .addAll(elements); + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData(EmptyParam carRentalData) { + this.carRentalData = carRentalData; + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData( + List carRentalData) { + this.carRentalData = carRentalData; + return this; + } + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -2104,12 +2178,99 @@ public Builder setFlight(PaymentIntentCaptureParams.PaymentDetails.Flight flight return this; } + /** + * Add an element to `flightData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFlightData(PaymentIntentCaptureParams.PaymentDetails.FlightData element) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData).add(element); + return this; + } + + /** + * Add all elements to `flightData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFlightData( + List elements) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData) + .addAll(elements); + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData(EmptyParam flightData) { + this.flightData = flightData; + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData( + List flightData) { + this.flightData = flightData; + return this; + } + /** Lodging reservation details for this PaymentIntent. */ public Builder setLodging(PaymentIntentCaptureParams.PaymentDetails.Lodging lodging) { this.lodging = lodging; return this; } + /** + * Add an element to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLodgingData(PaymentIntentCaptureParams.PaymentDetails.LodgingData element) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData) + .add(element); + return this; + } + + /** + * Add all elements to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLodgingData( + List elements) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData) + .addAll(elements); + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData(EmptyParam lodgingData) { + this.lodgingData = lodgingData; + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData( + List lodgingData) { + this.lodgingData = lodgingData; + return this; + } + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -3497,30 +3658,38 @@ public enum RateInterval implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - 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. */ + public static class CarRentalData { + /** Affiliate (such as travel agency) details for the rental. */ @SerializedName("affiliate") Affiliate affiliate; - /** The name of the company. */ - @SerializedName("company") - String company; + /** Booking confirmation number for the car rental. */ + @SerializedName("booking_number") + String bookingNumber; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** Name of the car rental company. */ + @SerializedName("carrier_name") + String carrierName; - /** Event end time. Measured in seconds since the Unix epoch. */ - @SerializedName("ends_at") - Long endsAt; + /** Customer service phone number for the car rental company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** Number of days the car is being rented. */ + @SerializedName("days_rented") + Long daysRented; + + /** Distance details for the rental. */ + @SerializedName("distance") + Distance distance; + + /** List of drivers for the rental. */ + @SerializedName("drivers") + List drivers; + + /** Required. Drop-off location details. */ + @SerializedName("drop_off") + DropOff dropOff; /** * Map of extra parameters for custom features not available in this client library. The @@ -3531,39 +3700,61 @@ public static class EventDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Type of the event entertainment (concert, sports event etc). */ - @SerializedName("genre") - String genre; + /** Insurance details for the rental. */ + @SerializedName("insurances") + List insurances; - /** Required. The name of the event. */ - @SerializedName("name") - String name; + /** Indicates if the customer was a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; - /** Event start time. Measured in seconds since the Unix epoch. */ - @SerializedName("starts_at") - Long startsAt; + /** Required. Pickup location details. */ + @SerializedName("pickup") + Pickup pickup; - private EventDetails( - Boolean accessControlledVenue, - Address address, + /** Name of the person renting the vehicle. */ + @SerializedName("renter_name") + String renterName; + + /** Required. Total cost breakdown for the rental. */ + @SerializedName("total") + Total total; + + /** Vehicle details for the rental. */ + @SerializedName("vehicle") + Vehicle vehicle; + + private CarRentalData( Affiliate affiliate, - String company, - Delivery delivery, - Long endsAt, + String bookingNumber, + String carrierName, + String customerServicePhoneNumber, + Long daysRented, + Distance distance, + List drivers, + DropOff dropOff, Map extraParams, - String genre, - String name, - Long startsAt) { - this.accessControlledVenue = accessControlledVenue; - this.address = address; + List insurances, + Boolean noShowIndicator, + Pickup pickup, + String renterName, + Total total, + Vehicle vehicle) { this.affiliate = affiliate; - this.company = company; - this.delivery = delivery; - this.endsAt = endsAt; + this.bookingNumber = bookingNumber; + this.carrierName = carrierName; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.daysRented = daysRented; + this.distance = distance; + this.drivers = drivers; + this.dropOff = dropOff; this.extraParams = extraParams; - this.genre = genre; - this.name = name; - this.startsAt = startsAt; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.pickup = pickup; + this.renterName = renterName; + this.total = total; + this.vehicle = vehicle; } public static Builder builder() { @@ -3571,84 +3762,135 @@ public static Builder builder() { } public static class Builder { - private Boolean accessControlledVenue; + private Affiliate affiliate; - private Address address; + private String bookingNumber; - private Affiliate affiliate; + private String carrierName; - private String company; + private String customerServicePhoneNumber; - private Delivery delivery; + private Long daysRented; - private Long endsAt; + private Distance distance; + + private List drivers; + + private DropOff dropOff; private Map extraParams; - private String genre; + private List insurances; - private String name; + private Boolean noShowIndicator; - private Long startsAt; + private Pickup pickup; + + private String renterName; + + private Total total; + + private Vehicle vehicle; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.EventDetails build() { - return new PaymentIntentCaptureParams.PaymentDetails.EventDetails( - this.accessControlledVenue, - this.address, + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData( this.affiliate, - this.company, - this.delivery, - this.endsAt, + this.bookingNumber, + this.carrierName, + this.customerServicePhoneNumber, + this.daysRented, + this.distance, + this.drivers, + this.dropOff, this.extraParams, - this.genre, - this.name, - this.startsAt); + this.insurances, + this.noShowIndicator, + this.pickup, + this.renterName, + this.total, + this.vehicle); } - /** Indicates if the tickets are digitally checked when entering the venue. */ - public Builder setAccessControlledVenue(Boolean accessControlledVenue) { - this.accessControlledVenue = accessControlledVenue; + /** Affiliate (such as travel agency) details for the rental. */ + public Builder setAffiliate( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - /** The event location's address. */ - public Builder setAddress( - PaymentIntentCaptureParams.PaymentDetails.EventDetails.Address address) { - this.address = address; + /** Booking confirmation number for the car rental. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentCaptureParams.PaymentDetails.EventDetails.Affiliate affiliate) { - this.affiliate = affiliate; + /** Name of the car rental company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; return this; } - /** The name of the company. */ - public Builder setCompany(String company) { - this.company = company; + /** Customer service phone number for the car rental company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; return this; } - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery delivery) { - this.delivery = delivery; + /** Number of days the car is being rented. */ + public Builder setDaysRented(Long daysRented) { + this.daysRented = daysRented; return this; } - /** Event end time. Measured in seconds since the Unix epoch. */ - public Builder setEndsAt(Long endsAt) { - this.endsAt = endsAt; + /** Distance details for the rental. */ + public Builder setDistance( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Distance distance) { + this.distance = distance; + 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 + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData#drivers} for the field + * documentation. + */ + public Builder addDriver( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.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 + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData#drivers} for the field + * documentation. + */ + public Builder addAllDriver( + List elements) { + if (this.drivers == null) { + this.drivers = new ArrayList<>(); + } + this.drivers.addAll(elements); + return this; + } + + /** Required. Drop-off location details. */ + public Builder setDropOff( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff dropOff) { + this.dropOff = dropOff; 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 PaymentIntentCaptureParams.PaymentDetails.EventDetails#extraParams} for + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.CarRentalData#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3662,7 +3904,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.EventDetails#extraParams} for + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.CarRentalData#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3673,38 +3915,76 @@ public Builder putAllExtraParam(Map 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; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** Event start time. Measured in seconds since the Unix epoch. */ - public Builder setStartsAt(Long startsAt) { - this.startsAt = startsAt; + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Indicates if the customer was a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } + + /** Required. Pickup location details. */ + public Builder setPickup( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup pickup) { + this.pickup = pickup; + return this; + } + + /** Name of the person renting the vehicle. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total cost breakdown for the rental. */ + public Builder setTotal( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total total) { + this.total = total; + return this; + } + + /** Vehicle details for the rental. */ + public Builder setVehicle( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Vehicle vehicle) { + this.vehicle = vehicle; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - 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; + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; /** * Map of extra parameters for custom features not available in this client library. The @@ -3716,37 +3996,14 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the 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; + /** Name of affiliate partner. */ + @SerializedName("name") + String name; - private Address( - String city, - String country, - Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + private Affiliate(String code, Map extraParams, String name) { + this.code = code; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.name = name; } public static Builder builder() { @@ -3754,44 +4011,21 @@ public static Builder builder() { } public static class Builder { - private String city; - - private String country; + private String code; private Map extraParams; - private String line1; - - private String line2; - - private String postalCode; - - private String state; + private String name; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.EventDetails.Address build() { - return new PaymentIntentCaptureParams.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; + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Affiliate build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Affiliate( + this.code, this.extraParams, this.name); } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; return this; } @@ -3799,7 +4033,7 @@ public Builder setCountry(String country) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Address#extraParams} for the + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Affiliate#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3814,7 +4048,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Address#extraParams} for the + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Affiliate#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3825,27 +4059,9 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } - - /** Address line 2, such as the 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; + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; return this; } } @@ -3853,7 +4069,11 @@ public Builder setState(String state) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Distance { + /** Required. Distance traveled. */ + @SerializedName("amount") + Long amount; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -3864,13 +4084,17 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + @SerializedName("unit") + Unit unit; - private Affiliate(Map extraParams, String name) { + private Distance(Long amount, Map extraParams, Unit unit) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; + this.unit = unit; } public static Builder builder() { @@ -3878,21 +4102,29 @@ public static Builder builder() { } public static class Builder { + private Long amount; + private Map extraParams; - private String name; + private Unit unit; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.EventDetails.Affiliate build() { - return new PaymentIntentCaptureParams.PaymentDetails.EventDetails.Affiliate( - this.extraParams, this.name); + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Distance build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Distance( + this.amount, this.extraParams, this.unit); + } + + /** Required. Distance traveled. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 - * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Distance#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3907,7 +4139,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Distance#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -3918,17 +4150,48 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + public Builder setUnit( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Distance.Unit unit) { + this.unit = unit; return this; } } + + public enum Unit implements ApiRequestParams.EnumParam { + @SerializedName("kilometers") + KILOMETERS("kilometers"), + + @SerializedName("miles") + MILES("miles"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Unit(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Driver { + /** Driver's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Driver's identification number. */ + @SerializedName("driver_identification_number") + String driverIdentificationNumber; + + /** Driver's tax number. */ + @SerializedName("driver_tax_number") + String driverTaxNumber; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -3939,18 +4202,21 @@ public static class Delivery { @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; + /** Required. Driver's full name. */ + @SerializedName("name") + String name; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Driver( + DateOfBirth dateOfBirth, + String driverIdentificationNumber, + String driverTaxNumber, + Map extraParams, + String name) { + this.dateOfBirth = dateOfBirth; + this.driverIdentificationNumber = driverIdentificationNumber; + this.driverTaxNumber = driverTaxNumber; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.name = name; } public static Builder builder() { @@ -3958,23 +4224,51 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; + private DateOfBirth dateOfBirth; - private Mode mode; + private String driverIdentificationNumber; - private Recipient recipient; + private String driverTaxNumber; + + private Map extraParams; + + private String name; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery build() { - return new PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery( - this.extraParams, this.mode, this.recipient); + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver( + this.dateOfBirth, + this.driverIdentificationNumber, + this.driverTaxNumber, + this.extraParams, + this.name); + } + + /** Driver's date of birth. */ + public Builder setDateOfBirth( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth + dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Driver's identification number. */ + public Builder setDriverIdentificationNumber(String driverIdentificationNumber) { + this.driverIdentificationNumber = driverIdentificationNumber; + return this; + } + + /** Driver's tax number. */ + public Builder setDriverTaxNumber(String driverTaxNumber) { + this.driverTaxNumber = driverTaxNumber; + 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 - * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -3989,7 +4283,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4000,27 +4294,19 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Mode mode) { - this.mode = mode; - return this; - } - - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Driver's full name. */ + public Builder setName(String name) { + this.name = name; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class DateOfBirth { + /** Required. Day of birth (1-31). */ + @SerializedName("day") + Long day; /** * Map of extra parameters for custom features not available in this client library. The @@ -4032,20 +4318,19 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + /** Required. Month of birth (1-12). */ + @SerializedName("month") + Long month; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + /** Required. Year of birth (must be greater than 1900). */ + @SerializedName("year") + Long year; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.month = month; + this.year = year; } public static Builder builder() { @@ -4053,24 +4338,24 @@ public static Builder builder() { } public static class Builder { - private String email; + private Long day; private Map extraParams; - private String name; + private Long month; - private String phone; + private Long year; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth build() { - return new PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth( + this.day, this.extraParams, this.month, this.year); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. Day of birth (1-31). */ + public Builder setDay(Long day) { + this.day = day; return this; } @@ -4078,7 +4363,7 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4093,7 +4378,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4104,283 +4389,299 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** Required. Month of birth (1-12). */ + public Builder setMonth(Long month) { + this.month = month; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Required. Year of birth (must be greater than 1900). */ + public Builder setYear(Long year) { + this.year = year; return this; } } } + } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DropOff { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; - @SerializedName("phone") - PHONE("phone"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Location name. */ + @SerializedName("location_name") + String locationName; - @SerializedName("post") - POST("post"); + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - @Getter(onMethod_ = {@Override}) - private final String value; + private DropOff( + Address address, Map extraParams, String locationName, Long time) { + this.address = address; + this.extraParams = extraParams; + this.locationName = locationName; + this.time = time; + } - Mode(String value) { - this.value = value; - } + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Flight { - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + public static class Builder { + private Address address; - /** - * 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; + private Map extraParams; - /** - * The International Air Transport Association (IATA) carrier code of the carrier that issued - * the ticket. - */ - @SerializedName("carrier") - String carrier; + private String locationName; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + private Long time; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff( + this.address, this.extraParams, this.locationName, this.time); + } - /** The name of the person or entity on the reservation. */ - @SerializedName("passenger_name") - String passengerName; + /** Required. Address of the rental location. */ + public Builder setAddress( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff.Address address) { + this.address = address; + return this; + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Required. The individual flight segments associated with the trip. */ - @SerializedName("segments") - List segments; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff#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 ticket number associated with the travel reservation. */ - @SerializedName("ticket_number") - String ticketNumber; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; + return this; + } - 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; - } + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; + return this; + } + } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - public static class Builder { - private Affiliate affiliate; + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - private String agencyNumber; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 String carrier; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - private Delivery delivery; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Map extraParams; + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; - private String passengerName; + /** State, county, province, or region. */ + @SerializedName("state") + String state; - private List passengers; + 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; + } - private List segments; + public static Builder builder() { + return new Builder(); + } - private String ticketNumber; + public static class Builder { + private String city; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Flight build() { - return new PaymentIntentCaptureParams.PaymentDetails.Flight( - this.affiliate, - this.agencyNumber, - this.carrier, - this.delivery, - this.extraParams, - this.passengerName, - this.passengers, - this.segments, - this.ticketNumber); - } + private String country; - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentCaptureParams.PaymentDetails.Flight.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + private Map extraParams; - /** - * 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; - } + private String line1; - /** - * 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; - } + private String line2; - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery delivery) { - this.delivery = delivery; - return this; - } + private String postalCode; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.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; - } + private String state; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff.Address build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - /** The name of the person or entity on the reservation. */ - public Builder setPassengerName(String passengerName) { - this.passengerName = passengerName; - return this; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + 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 - * PaymentIntentCaptureParams.PaymentDetails.Flight#passengers} for the field documentation. - */ - public Builder addPassenger( - PaymentIntentCaptureParams.PaymentDetails.Flight.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.add(element); - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + 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 - * PaymentIntentCaptureParams.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 a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff.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 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 - * PaymentIntentCaptureParams.PaymentDetails.Flight#segments} for the field documentation. - */ - public Builder addSegment( - PaymentIntentCaptureParams.PaymentDetails.Flight.Segment element) { - if (this.segments == null) { - this.segments = new ArrayList<>(); - } - this.segments.add(element); - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.DropOff.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; + } - /** - * 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 - * PaymentIntentCaptureParams.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; - } + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } - /** The ticket number associated with the travel reservation. */ - public Builder setTicketNumber(String ticketNumber) { - this.ticketNumber = ticketNumber; - return this; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Required. 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 @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Insurance { + /** Required. Amount of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -4391,13 +4692,25 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - private Affiliate(Map extraParams, String name) { + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.name = name; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { @@ -4405,21 +4718,44 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private String currency; + private Map extraParams; - private String name; + private String insuranceCompanyName; + + private InsuranceType insuranceType; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Flight.Affiliate build() { - return new PaymentIntentCaptureParams.PaymentDetails.Flight.Affiliate( - this.extraParams, this.name); + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Insurance build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Amount of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Flight.Affiliate#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Insurance#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4432,8 +4768,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Flight.Affiliate#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Insurance#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4443,17 +4780,56 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; return this; } } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("liability_supplement") + LIABILITY_SUPPLEMENT("liability_supplement"), + + @SerializedName("loss_damage_waiver") + LOSS_DAMAGE_WAIVER("loss_damage_waiver"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_damage_waiver") + PARTIAL_DAMAGE_WAIVER("partial_damage_waiver"), + + @SerializedName("personal_accident") + PERSONAL_ACCIDENT("personal_accident"), + + @SerializedName("personal_effects") + PERSONAL_EFFECTS("personal_effects"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Pickup { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -4464,18 +4840,20 @@ public static class Delivery { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** Location name. */ + @SerializedName("location_name") + String locationName; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Pickup( + Address address, Map extraParams, String locationName, Long time) { + this.address = address; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.locationName = locationName; + this.time = time; } public static Builder builder() { @@ -4483,23 +4861,33 @@ public static Builder builder() { } public static class Builder { + private Address address; + private Map extraParams; - private Mode mode; + private String locationName; - private Recipient recipient; + private Long time; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery build() { - return new PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery( - this.extraParams, this.mode, this.recipient); + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup( + this.address, this.extraParams, this.locationName, this.time); + } + + /** Required. Address of the rental location. */ + public Builder setAddress( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup.Address address) { + this.address = address; + 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 PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4512,8 +4900,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4523,27 +4912,32 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Mode mode) { - this.mode = mode; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; return this; } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. 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 @@ -4555,20 +4949,39 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + /** Required. 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.name = name; - this.phone = phone; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } public static Builder builder() { @@ -4576,23 +4989,44 @@ public static Builder builder() { } public static class Builder { - private String email; + private String city; + + private String country; private Map extraParams; - private String name; + private String line1; - private String phone; + private String line2; + + private String postalCode; + + private String state; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient build() { - return new PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup.Address build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; return this; } @@ -4600,8 +5034,8 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4615,8 +5049,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4626,156 +5060,55 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; 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 - @EqualsAndHashCode(callSuper = false) - 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 PaymentIntentCaptureParams.PaymentDetails.Flight.Passenger build() { - return new PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.PaymentDetails.Flight.Passenger#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Flight.Passenger#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; } - 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 @EqualsAndHashCode(callSuper = false) - public static class Segment { - /** The flight segment amount. */ + public static class Total { + /** Required. Total amount in cents. */ @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; + /** Currency of the amount. */ + @SerializedName("currency") + String currency; - /** - * Required. The departure time for the flight segment. Measured in seconds - * since the Unix epoch. - */ - @SerializedName("departs_at") - Long departsAt; + /** Discount details for the rental. */ + @SerializedName("discounts") + Discounts discounts; - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - @SerializedName("departure_airport") - String departureAirport; + /** Additional charges for the rental. */ + @SerializedName("extra_charges") + List + extraCharges; /** * Map of extra parameters for custom features not available in this client library. The @@ -4787,33 +5120,36 @@ public static class Segment { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The flight number associated with the segment. */ - @SerializedName("flight_number") - String flightNumber; + /** Rate per unit for the rental. */ + @SerializedName("rate_per_unit") + Long ratePerUnit; - /** The fare class for the segment. */ - @SerializedName("service_class") - ServiceClass serviceClass; + /** Unit of measurement for the rate. */ + @SerializedName("rate_unit") + RateUnit rateUnit; - private Segment( + /** Tax breakdown for the rental. */ + @SerializedName("tax") + Tax tax; + + private Total( Long amount, - String arrivalAirport, - Long arrivesAt, - String carrier, - Long departsAt, - String departureAirport, + String currency, + Discounts discounts, + List + extraCharges, Map extraParams, - String flightNumber, - ServiceClass serviceClass) { + Long ratePerUnit, + RateUnit rateUnit, + Tax tax) { this.amount = amount; - this.arrivalAirport = arrivalAirport; - this.arrivesAt = arrivesAt; - this.carrier = carrier; - this.departsAt = departsAt; - this.departureAirport = departureAirport; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.flightNumber = flightNumber; - this.serviceClass = serviceClass; + this.ratePerUnit = ratePerUnit; + this.rateUnit = rateUnit; + this.tax = tax; } public static Builder builder() { @@ -4823,89 +5159,90 @@ public static Builder builder() { public static class Builder { private Long amount; - private String arrivalAirport; - - private Long arrivesAt; - - private String carrier; + private String currency; - private Long departsAt; + private Discounts discounts; - private String departureAirport; + private List + extraCharges; private Map extraParams; - private String flightNumber; + private Long ratePerUnit; - private ServiceClass serviceClass; + private RateUnit rateUnit; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Flight.Segment build() { - return new PaymentIntentCaptureParams.PaymentDetails.Flight.Segment( + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total( this.amount, - this.arrivalAirport, - this.arrivesAt, - this.carrier, - this.departsAt, - this.departureAirport, + this.currency, + this.discounts, + this.extraCharges, this.extraParams, - this.flightNumber, - this.serviceClass); + this.ratePerUnit, + this.rateUnit, + this.tax); } - /** The flight segment amount. */ + /** Required. Total amount in cents. */ 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; + /** Currency of the amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; 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; + /** Discount details for the rental. */ + public Builder setDiscounts( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Discounts discounts) { + this.discounts = discounts; return this; } /** - * Required. The departure time for the flight segment. Measured in - * seconds since the Unix epoch. + * 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 + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total#extraCharges} for the + * field documentation. */ - public Builder setDepartsAt(Long departsAt) { - this.departsAt = departsAt; + public Builder addExtraCharge( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge element) { + if (this.extraCharges == null) { + this.extraCharges = new ArrayList<>(); + } + this.extraCharges.add(element); return this; } /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. + * 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 PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total#extraCharges} + * for the field documentation. */ - public Builder setDepartureAirport(String departureAirport) { - this.departureAirport = departureAirport; + 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 PaymentIntentCaptureParams.PaymentDetails.Flight.Segment#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4918,8 +5255,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Flight.Segment#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4929,499 +5267,6117 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The flight number associated with the segment. */ - public Builder setFlightNumber(String flightNumber) { - this.flightNumber = flightNumber; + /** Rate per unit for the rental. */ + public Builder setRatePerUnit(Long ratePerUnit) { + this.ratePerUnit = ratePerUnit; return this; } - /** The fare class for the segment. */ - public Builder setServiceClass( - PaymentIntentCaptureParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { - this.serviceClass = serviceClass; + /** Unit of measurement for the rate. */ + public Builder setRateUnit( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.RateUnit rateUnit) { + this.rateUnit = rateUnit; + return this; + } + + /** Tax breakdown for the rental. */ + public Builder setTax( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax tax) { + this.tax = tax; return this; } } - public enum ServiceClass implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - @SerializedName("economy") - ECONOMY("economy"), + /** Coupon code applied to the rental. */ + @SerializedName("coupon") + String coupon; - @SerializedName("first") - FIRST("first"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("premium_economy") - PREMIUM_ECONOMY("premium_economy"); + /** Maximum number of free miles or kilometers included. */ + @SerializedName("maximum_free_miles_or_kilometers") + Long maximumFreeMilesOrKilometers; - @Getter(onMethod_ = {@Override}) - private final String value; + private Discounts( + String corporateClientCode, + String coupon, + Map extraParams, + Long maximumFreeMilesOrKilometers) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + } - ServiceClass(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Lodging { - /** The lodging location's address. */ - @SerializedName("address") - Address address; + public static class Builder { + private String corporateClientCode; - /** The number of adults on the booking. */ - @SerializedName("adults") - Long adults; + private String coupon; - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + private Map extraParams; - /** The booking number associated with the lodging reservation. */ - @SerializedName("booking_number") - String bookingNumber; + private Long maximumFreeMilesOrKilometers; - /** The lodging category. */ - @SerializedName("category") - Category category; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Discounts build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Discounts( + this.corporateClientCode, + this.coupon, + this.extraParams, + this.maximumFreeMilesOrKilometers); + } - /** - * Required. Lodging check-in time. Measured in seconds since the Unix epoch. - */ - @SerializedName("checkin_at") - Long checkinAt; + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - @SerializedName("checkout_at") - Long checkoutAt; + /** Coupon code applied to the rental. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } - /** The customer service phone number of the lodging company. */ - @SerializedName("customer_service_phone_number") - String customerServicePhoneNumber; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** The daily lodging room rate. */ - @SerializedName("daily_room_rate_amount") - Long dailyRoomRateAmount; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** Maximum number of free miles or kilometers included. */ + public Builder setMaximumFreeMilesOrKilometers(Long maximumFreeMilesOrKilometers) { + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + return this; + } + } + } - /** List of additional charges being billed. */ - @SerializedName("extra_charges") - List extraCharges; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Required. Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @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; + /** Required. Type of extra charge. */ + @SerializedName("type") + Type type; - /** The name of the lodging location. */ - @SerializedName("name") - String name; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } - /** - * Indicates if the customer did not keep their booking while failing to cancel the - * reservation. - */ - @SerializedName("no_show") - Boolean noShow; + public static Builder builder() { + return new Builder(); + } - /** The number of rooms on the booking. */ - @SerializedName("number_of_rooms") - Long numberOfRooms; + public static class Builder { + private Long amount; - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + private Map extraParams; - /** The phone number of the lodging location. */ - @SerializedName("property_phone_number") - String propertyPhoneNumber; + private Type type; - /** The room class for this purchase. */ - @SerializedName("room_class") - String roomClass; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge + build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } - /** The number of room nights. */ - @SerializedName("room_nights") - Long roomNights; + /** Required. Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** The total tax amount associating with the room reservation. */ - @SerializedName("total_room_tax_amount") - Long totalRoomTaxAmount; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** The total tax amount. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - 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; - } + /** Required. Type of extra charge. */ + public Builder setType( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.ExtraCharge.Type + type) { + this.type = type; + return this; + } + } - public static Builder builder() { - return new Builder(); - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("extra_mileage") + EXTRA_MILEAGE("extra_mileage"), - public static class Builder { - private Address address; + @SerializedName("gas") + GAS("gas"), - private Long adults; + @SerializedName("gps") + GPS("gps"), - private Affiliate affiliate; + @SerializedName("late_charge") + LATE_CHARGE("late_charge"), - private String bookingNumber; + @SerializedName("one_way_drop_off") + ONE_WAY_DROP_OFF("one_way_drop_off"), - private Category category; + @SerializedName("other") + OTHER("other"), - private Long checkinAt; + @SerializedName("parking") + PARKING("parking"), - private Long checkoutAt; + @SerializedName("phone") + PHONE("phone"), - private String customerServicePhoneNumber; + @SerializedName("regular_mileage") + REGULAR_MILEAGE("regular_mileage"), - private Long dailyRoomRateAmount; + @SerializedName("towing") + TOWING("towing"); - private Delivery delivery; + @Getter(onMethod_ = {@Override}) + private final String value; - private List extraCharges; + Type(String value) { + this.value = value; + } + } + } - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Boolean fireSafetyActCompliance; + /** Indicates if the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - private String name; + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; - private Boolean noShow; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - private Long numberOfRooms; + public static Builder builder() { + return new Builder(); + } - private List passengers; + public static class Builder { + private Map extraParams; - private String propertyPhoneNumber; + private Boolean taxExemptIndicator; - private String roomClass; + private List + taxes; - private Long roomNights; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - private Long totalRoomTaxAmount; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.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; + } - private Long totalTaxAmount; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Lodging build() { - return new PaymentIntentCaptureParams.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); - } + /** Indicates if the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } - /** The lodging location's address. */ - public Builder setAddress( - PaymentIntentCaptureParams.PaymentDetails.Lodging.Address address) { - this.address = address; - return this; - } + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the + * field documentation. + */ + public Builder addTax( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - /** The number of adults on the booking. */ - public Builder setAdults(Long adults) { - this.adults = adults; - return this; - } + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the + * field documentation. + */ + public Builder addAllTax( + List + elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentCaptureParams.PaymentDetails.Lodging.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; - /** The booking number associated with the lodging reservation. */ - public Builder setBookingNumber(String bookingNumber) { - this.bookingNumber = bookingNumber; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Tax rate applied. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + String type; + + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - /** The lodging category. */ - public Builder setCategory( - PaymentIntentCaptureParams.PaymentDetails.Lodging.Category category) { - this.category = category; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Required. Lodging check-in time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckinAt(Long checkinAt) { - this.checkinAt = checkinAt; - return this; - } + public static class Builder { + private Long amount; - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckoutAt(Long checkoutAt) { - this.checkoutAt = checkoutAt; - return this; - } + private Map extraParams; - /** The customer service phone number of the lodging company. */ - public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { - this.customerServicePhoneNumber = customerServicePhoneNumber; - return this; - } + private Long rate; - /** The daily lodging room rate. */ - public Builder setDailyRoomRateAmount(Long dailyRoomRateAmount) { - this.dailyRoomRateAmount = dailyRoomRateAmount; - return this; - } + private String type; - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery delivery) { - this.delivery = delivery; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - /** - * 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 - * PaymentIntentCaptureParams.PaymentDetails.Lodging#extraCharges} for the field - * documentation. - */ - public Builder addExtraCharge( - PaymentIntentCaptureParams.PaymentDetails.Lodging.ExtraCharge element) { - if (this.extraCharges == null) { - this.extraCharges = new ArrayList<>(); - } - this.extraCharges.add(element); - return this; - } + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 - * PaymentIntentCaptureParams.PaymentDetails.Lodging#extraCharges} for the field - * documentation. - */ - public Builder addAllExtraCharge( - List elements) { - if (this.extraCharges == null) { - this.extraCharges = new ArrayList<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.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 + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.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; + } + + /** Tax rate applied. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } } - 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 PaymentIntentCaptureParams.PaymentDetails.Lodging#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum RateUnit implements ApiRequestParams.EnumParam { + @SerializedName("days") + DAYS("days"), + + @SerializedName("kilometers") + KILOMETERS("kilometers"), + + @SerializedName("miles") + MILES("miles"), + + @SerializedName("months") + MONTHS("months"), + + @SerializedName("weeks") + WEEKS("weeks"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RateUnit(String value) { + this.value = value; } - this.extraParams.put(key, value); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vehicle { /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Lodging#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ - public Builder setFireSafetyActCompliance(Boolean fireSafetyActCompliance) { - this.fireSafetyActCompliance = fireSafetyActCompliance; - return this; - } + /** Make of the rental vehicle. */ + @SerializedName("make") + String make; - /** The name of the lodging location. */ + /** Model of the rental vehicle. */ + @SerializedName("model") + String model; + + /** Odometer reading at the time of rental. */ + @SerializedName("odometer") + Long odometer; + + /** Type of the rental vehicle. */ + @SerializedName("type") + Type type; + + /** Class of the rental vehicle. */ + @SerializedName("vehicle_class") + VehicleClass vehicleClass; + + /** Vehicle identification number (VIN). */ + @SerializedName("vehicle_identification_number") + String vehicleIdentificationNumber; + + private Vehicle( + Map extraParams, + String make, + String model, + Long odometer, + Type type, + VehicleClass vehicleClass, + String vehicleIdentificationNumber) { + this.extraParams = extraParams; + this.make = make; + this.model = model; + this.odometer = odometer; + this.type = type; + this.vehicleClass = vehicleClass; + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String make; + + private String model; + + private Long odometer; + + private Type type; + + private VehicleClass vehicleClass; + + private String vehicleIdentificationNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Vehicle build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Vehicle( + this.extraParams, + this.make, + this.model, + this.odometer, + this.type, + this.vehicleClass, + this.vehicleIdentificationNumber); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Vehicle#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Vehicle#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Make of the rental vehicle. */ + public Builder setMake(String make) { + this.make = make; + return this; + } + + /** Model of the rental vehicle. */ + public Builder setModel(String model) { + this.model = model; + return this; + } + + /** Odometer reading at the time of rental. */ + public Builder setOdometer(Long odometer) { + this.odometer = odometer; + return this; + } + + /** Type of the rental vehicle. */ + public Builder setType( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Vehicle.Type type) { + this.type = type; + return this; + } + + /** Class of the rental vehicle. */ + public Builder setVehicleClass( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Vehicle.VehicleClass + vehicleClass) { + this.vehicleClass = vehicleClass; + return this; + } + + /** Vehicle identification number (VIN). */ + public Builder setVehicleIdentificationNumber(String vehicleIdentificationNumber) { + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("cargo_van") + CARGO_VAN("cargo_van"), + + @SerializedName("compact") + COMPACT("compact"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("exotic") + EXOTIC("exotic"), + + @SerializedName("exotic_suv") + EXOTIC_SUV("exotic_suv"), + + @SerializedName("fifteen_passenger_van") + FIFTEEN_PASSENGER_VAN("fifteen_passenger_van"), + + @SerializedName("four_wheel_drive") + FOUR_WHEEL_DRIVE("four_wheel_drive"), + + @SerializedName("full_size") + FULL_SIZE("full_size"), + + @SerializedName("intermediate") + INTERMEDIATE("intermediate"), + + @SerializedName("large_suv") + LARGE_SUV("large_suv"), + + @SerializedName("large_truck") + LARGE_TRUCK("large_truck"), + + @SerializedName("luxury") + LUXURY("luxury"), + + @SerializedName("medium_suv") + MEDIUM_SUV("medium_suv"), + + @SerializedName("midsize") + MIDSIZE("midsize"), + + @SerializedName("mini") + MINI("mini"), + + @SerializedName("minivan") + MINIVAN("minivan"), + + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), + + @SerializedName("moped") + MOPED("moped"), + + @SerializedName("moving_van") + MOVING_VAN("moving_van"), + + @SerializedName("premium") + PREMIUM("premium"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("small_medium_truck") + SMALL_MEDIUM_TRUCK("small_medium_truck"), + + @SerializedName("small_suv") + SMALL_SUV("small_suv"), + + @SerializedName("special") + SPECIAL("special"), + + @SerializedName("standard") + STANDARD("standard"), + + @SerializedName("stretch") + STRETCH("stretch"), + + @SerializedName("subcompact") + SUBCOMPACT("subcompact"), + + @SerializedName("taxi") + TAXI("taxi"), + + @SerializedName("twelve_foot_truck") + TWELVE_FOOT_TRUCK("twelve_foot_truck"), + + @SerializedName("twelve_passenger_van") + TWELVE_PASSENGER_VAN("twelve_passenger_van"), + + @SerializedName("twenty_foot_truck") + TWENTY_FOOT_TRUCK("twenty_foot_truck"), + + @SerializedName("twenty_four_foot_truck") + TWENTY_FOUR_FOOT_TRUCK("twenty_four_foot_truck"), + + @SerializedName("twenty_six_foot_truck") + TWENTY_SIX_FOOT_TRUCK("twenty_six_foot_truck"), + + @SerializedName("unique") + UNIQUE("unique"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + + public enum VehicleClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VehicleClass(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.EventDetails build() { + return new PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.PaymentDetails.EventDetails.Address address) { + this.address = address; + return this; + } + + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the 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 PaymentIntentCaptureParams.PaymentDetails.EventDetails.Address build() { + return new PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the 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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.EventDetails.Affiliate build() { + return new PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery build() { + return new PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.EventDetails.Delivery.Recipient + build() { + return new PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Flight build() { + return new PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.PaymentDetails.Flight#passengers} for the field documentation. + */ + public Builder addPassenger( + PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.PaymentDetails.Flight#segments} for the field documentation. + */ + public Builder addSegment( + PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Flight.Affiliate build() { + return new PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery build() { + return new PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Flight.Passenger build() { + return new PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Flight.Segment build() { + return new PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + public static class FlightData { + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Reservation reference. */ + @SerializedName("booking_number") + String bookingNumber; + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + @SerializedName("computerized_reservation_system") + String computerizedReservationSystem; + + /** Ticket restrictions. */ + @SerializedName("endorsements_and_restrictions") + String endorsementsAndRestrictions; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances. */ + @SerializedName("insurances") + List insurances; + + /** List of passengers. */ + @SerializedName("passengers") + List passengers; + + /** Required. List of flight segments. */ + @SerializedName("segments") + List segments; + + /** Electronic ticket indicator. */ + @SerializedName("ticket_electronically_issued_indicator") + Boolean ticketElectronicallyIssuedIndicator; + + /** Required. Total cost breakdown. */ + @SerializedName("total") + Total total; + + /** Type of flight transaction. */ + @SerializedName("transaction_type") + TransactionType transactionType; + + private FlightData( + Affiliate affiliate, + String bookingNumber, + String computerizedReservationSystem, + String endorsementsAndRestrictions, + Map extraParams, + List insurances, + List passengers, + List segments, + Boolean ticketElectronicallyIssuedIndicator, + Total total, + TransactionType transactionType) { + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.computerizedReservationSystem = computerizedReservationSystem; + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.segments = segments; + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + this.total = total; + this.transactionType = transactionType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Affiliate affiliate; + + private String bookingNumber; + + private String computerizedReservationSystem; + + private String endorsementsAndRestrictions; + + private Map extraParams; + + private List insurances; + + private List passengers; + + private List segments; + + private Boolean ticketElectronicallyIssuedIndicator; + + private Total total; + + private TransactionType transactionType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData( + this.affiliate, + this.bookingNumber, + this.computerizedReservationSystem, + this.endorsementsAndRestrictions, + this.extraParams, + this.insurances, + this.passengers, + this.segments, + this.ticketElectronicallyIssuedIndicator, + this.total, + this.transactionType); + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Reservation reference. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + public Builder setComputerizedReservationSystem(String computerizedReservationSystem) { + this.computerizedReservationSystem = computerizedReservationSystem; + return this; + } + + /** Ticket restrictions. */ + public Builder setEndorsementsAndRestrictions(String endorsementsAndRestrictions) { + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + 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 PaymentIntentCaptureParams.PaymentDetails.FlightData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.FlightData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData#passengers} for the field + * documentation. + */ + public Builder addPassenger( + PaymentIntentCaptureParams.PaymentDetails.FlightData.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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData#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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData#segments} for the field + * documentation. + */ + public Builder addSegment( + PaymentIntentCaptureParams.PaymentDetails.FlightData.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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData#segments} for the field + * documentation. + */ + public Builder addAllSegment( + List elements) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.addAll(elements); + return this; + } + + /** Electronic ticket indicator. */ + public Builder setTicketElectronicallyIssuedIndicator( + Boolean ticketElectronicallyIssuedIndicator) { + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + return this; + } + + /** Required. Total cost breakdown. */ + public Builder setTotal(PaymentIntentCaptureParams.PaymentDetails.FlightData.Total total) { + this.total = total; + return this; + } + + /** Type of flight transaction. */ + public Builder setTransactionType( + PaymentIntentCaptureParams.PaymentDetails.FlightData.TransactionType transactionType) { + this.transactionType = transactionType; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of affiliate partner. */ + @SerializedName("name") + String name; + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + @SerializedName("travel_authorization_code") + String travelAuthorizationCode; + + private Affiliate( + String code, + Map extraParams, + String name, + String travelAuthorizationCode) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + this.travelAuthorizationCode = travelAuthorizationCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String code; + + private Map extraParams; + + private String name; + + private String travelAuthorizationCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Affiliate build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Affiliate( + this.code, this.extraParams, this.name, this.travelAuthorizationCode); + } + + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.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; + } + + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + public Builder setTravelAuthorizationCode(String travelAuthorizationCode) { + this.travelAuthorizationCode = travelAuthorizationCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Insurance cost. */ + @SerializedName("amount") + Long amount; + + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Insurance company name. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Required. Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String currency; + + private Map extraParams; + + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Insurance build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Insurance cost. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Insurance company name. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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. Passenger's full name. */ + @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 PaymentIntentCaptureParams.PaymentDetails.FlightData.Passenger build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.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. Passenger's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Segment { + /** Segment fare amount. */ + @SerializedName("amount") + Long amount; + + /** Required. Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Required. Airline carrier code. */ + @SerializedName("carrier_code") + String carrierCode; + + /** Carrier name. */ + @SerializedName("carrier_name") + String carrierName; + + /** Segment currency. */ + @SerializedName("currency") + String currency; + + /** Required. Departure details. */ + @SerializedName("departure") + Departure departure; + + /** Exchange ticket number. */ + @SerializedName("exchange_ticket_number") + String exchangeTicketNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Fare basis code. */ + @SerializedName("fare_basis_code") + String fareBasisCode; + + /** Additional fees. */ + @SerializedName("fees") + Long fees; + + /** Flight number. */ + @SerializedName("flight_number") + String flightNumber; + + /** Stopover indicator. */ + @SerializedName("is_stop_over_indicator") + Boolean isStopOverIndicator; + + /** Refundable ticket indicator. */ + @SerializedName("refundable") + Boolean refundable; + + /** Required. Class of service. */ + @SerializedName("service_class") + ServiceClass serviceClass; + + /** Tax amount for segment. */ + @SerializedName("tax_amount") + Long taxAmount; + + /** Ticket number. */ + @SerializedName("ticket_number") + String ticketNumber; + + private Segment( + Long amount, + Arrival arrival, + String carrierCode, + String carrierName, + String currency, + Departure departure, + String exchangeTicketNumber, + Map extraParams, + String fareBasisCode, + Long fees, + String flightNumber, + Boolean isStopOverIndicator, + Boolean refundable, + ServiceClass serviceClass, + Long taxAmount, + String ticketNumber) { + this.amount = amount; + this.arrival = arrival; + this.carrierCode = carrierCode; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.exchangeTicketNumber = exchangeTicketNumber; + this.extraParams = extraParams; + this.fareBasisCode = fareBasisCode; + this.fees = fees; + this.flightNumber = flightNumber; + this.isStopOverIndicator = isStopOverIndicator; + this.refundable = refundable; + this.serviceClass = serviceClass; + this.taxAmount = taxAmount; + this.ticketNumber = ticketNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Arrival arrival; + + private String carrierCode; + + private String carrierName; + + private String currency; + + private Departure departure; + + private String exchangeTicketNumber; + + private Map extraParams; + + private String fareBasisCode; + + private Long fees; + + private String flightNumber; + + private Boolean isStopOverIndicator; + + private Boolean refundable; + + private ServiceClass serviceClass; + + private Long taxAmount; + + private String ticketNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment( + this.amount, + this.arrival, + this.carrierCode, + this.carrierName, + this.currency, + this.departure, + this.exchangeTicketNumber, + this.extraParams, + this.fareBasisCode, + this.fees, + this.flightNumber, + this.isStopOverIndicator, + this.refundable, + this.serviceClass, + this.taxAmount, + this.ticketNumber); + } + + /** Segment fare amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Required. Arrival details. */ + public Builder setArrival( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Arrival arrival) { + this.arrival = arrival; + return this; + } + + /** Required. Airline carrier code. */ + public Builder setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** Carrier name. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Segment currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Required. Departure details. */ + public Builder setDeparture( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Departure departure) { + this.departure = departure; + return this; + } + + /** Exchange ticket number. */ + public Builder setExchangeTicketNumber(String exchangeTicketNumber) { + this.exchangeTicketNumber = exchangeTicketNumber; + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.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; + } + + /** Fare basis code. */ + public Builder setFareBasisCode(String fareBasisCode) { + this.fareBasisCode = fareBasisCode; + return this; + } + + /** Additional fees. */ + public Builder setFees(Long fees) { + this.fees = fees; + return this; + } + + /** Flight number. */ + public Builder setFlightNumber(String flightNumber) { + this.flightNumber = flightNumber; + return this; + } + + /** Stopover indicator. */ + public Builder setIsStopOverIndicator(Boolean isStopOverIndicator) { + this.isStopOverIndicator = isStopOverIndicator; + return this; + } + + /** Refundable ticket indicator. */ + public Builder setRefundable(Boolean refundable) { + this.refundable = refundable; + return this; + } + + /** Required. Class of service. */ + public Builder setServiceClass( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.ServiceClass + serviceClass) { + this.serviceClass = serviceClass; + return this; + } + + /** Tax amount for segment. */ + public Builder setTaxAmount(Long taxAmount) { + this.taxAmount = taxAmount; + return this; + } + + /** Ticket number. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Required. Arrival airport IATA code. */ + @SerializedName("airport") + String airport; + + /** Arrival date/time. */ + @SerializedName("arrives_at") + Long arrivesAt; + + /** Arrival city. */ + @SerializedName("city") + String city; + + /** Arrival country. */ + @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; + + private Arrival( + String airport, + Long arrivesAt, + String city, + String country, + Map extraParams) { + this.airport = airport; + this.arrivesAt = arrivesAt; + this.city = city; + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String airport; + + private Long arrivesAt; + + private String city; + + private String country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Arrival build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Arrival( + this.airport, this.arrivesAt, this.city, this.country, this.extraParams); + } + + /** Required. Arrival airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } + + /** Arrival date/time. */ + public Builder setArrivesAt(Long arrivesAt) { + this.arrivesAt = arrivesAt; + return this; + } + + /** Arrival city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Arrival country. */ + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Arrival#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Required. Departure airport IATA code. */ + @SerializedName("airport") + String airport; + + /** Departure city. */ + @SerializedName("city") + String city; + + /** Departure country. */ + @SerializedName("country") + String country; + + /** Required. Departure date/time. */ + @SerializedName("departs_at") + Long departsAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Departure( + String airport, + String city, + String country, + Long departsAt, + Map extraParams) { + this.airport = airport; + this.city = city; + this.country = country; + this.departsAt = departsAt; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String airport; + + private String city; + + private String country; + + private Long departsAt; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Departure build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Departure( + this.airport, this.city, this.country, this.departsAt, this.extraParams); + } + + /** Required. Departure airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } + + /** Departure city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Departure country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** Required. Departure date/time. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Segment.Departure#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 ServiceClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Total { + /** Required. Total flight amount. */ + @SerializedName("amount") + Long amount; + + /** Reason for credit. */ + @SerializedName("credit_reason") + CreditReason creditReason; + + /** Total currency. */ + @SerializedName("currency") + String currency; + + /** Discount details. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges. */ + @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; + + /** Tax breakdown. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + CreditReason creditReason, + String currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Tax tax) { + this.amount = amount; + this.creditReason = creditReason; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private CreditReason creditReason; + + private String currency; + + private Discounts discounts; + + private List + extraCharges; + + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total( + this.amount, + this.creditReason, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.tax); + } + + /** Required. Total flight amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Reason for credit. */ + public Builder setCreditReason( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.CreditReason + creditReason) { + this.creditReason = creditReason; + return this; + } + + /** Total currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details. */ + public Builder setDiscounts( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.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 PaymentIntentCaptureParams.PaymentDetails.FlightData.Total#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 PaymentIntentCaptureParams.PaymentDetails.FlightData.Total#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.FlightData.Total#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 breakdown. */ + public Builder setTax( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Discounts(String corporateClientCode, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String corporateClientCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Discounts build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Discounts( + this.corporateClientCode, this.extraParams); + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Discounts#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 + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of additional charges. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 additional charges. */ + @SerializedName("type") + Type type; + + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } + + /** Amount of additional charges. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge#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 additional charges. */ + public Builder setType( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("additional_fees") + ADDITIONAL_FEES("additional_fees"), + + @SerializedName("ancillary_service_charges") + ANCILLARY_SERVICE_CHARGES("ancillary_service_charges"), + + @SerializedName("exchange_fee") + EXCHANGE_FEE("exchange_fee"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; + + private Tax( + Map extraParams, + List taxes) { + this.extraParams = extraParams; + this.taxes = taxes; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List taxes; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax( + this.extraParams, this.taxes); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.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; + } + + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } + + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax. */ + @SerializedName("type") + String type; + + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.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 + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.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; + } + + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } + } + + public enum CreditReason implements ApiRequestParams.EnumParam { + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_ticket_refund") + PARTIAL_TICKET_REFUND("partial_ticket_refund"), + + @SerializedName("passenger_transport_ancillary_cancellation") + PASSENGER_TRANSPORT_ANCILLARY_CANCELLATION("passenger_transport_ancillary_cancellation"), + + @SerializedName("ticket_and_ancillary_cancellation") + TICKET_AND_ANCILLARY_CANCELLATION("ticket_and_ancillary_cancellation"), + + @SerializedName("ticket_cancellation") + TICKET_CANCELLATION("ticket_cancellation"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CreditReason(String value) { + this.value = value; + } + } + } + + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("exchange_ticket") + EXCHANGE_TICKET("exchange_ticket"), + + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), + + @SerializedName("refund") + REFUND("refund"), + + @SerializedName("ticket_purchase") + TICKET_PURCHASE("ticket_purchase"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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. Lodging 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 PaymentIntentCaptureParams.PaymentDetails.Lodging build() { + return new PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.PaymentDetails.Lodging.Category category) { + this.category = category; + return this; + } + + /** + * Required. Lodging 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( + PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.PaymentDetails.Lodging#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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. + * 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 + * PaymentIntentCaptureParams.PaymentDetails.Lodging#passengers} for the field + * documentation. + */ + public Builder addPassenger( + PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the 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 PaymentIntentCaptureParams.PaymentDetails.Lodging.Address build() { + return new PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the 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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Lodging.Affiliate build() { + return new PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery build() { + return new PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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 PaymentIntentCaptureParams.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( + PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.PaymentDetails.Lodging.Passenger build() { + return new PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + * PaymentIntentCaptureParams.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 + @EqualsAndHashCode(callSuper = false) + public static class LodgingData { + /** Accommodation details for the lodging. */ + @SerializedName("accommodation") + Accommodation accommodation; + + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Booking confirmation number for the lodging. */ + @SerializedName("booking_number") + String bookingNumber; + + /** Required. Check-in date. */ + @SerializedName("checkin_at") + Long checkinAt; + + /** Required. Check-out date. */ + @SerializedName("checkout_at") + Long checkoutAt; + + /** Customer service phone number for the lodging company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + @SerializedName("fire_safety_act_compliance_indicator") + Boolean fireSafetyActComplianceIndicator; + + /** List of guests for the lodging. */ + @SerializedName("guests") + List guests; + + /** Host details for the lodging. */ + @SerializedName("host") + Host host; + + /** List of insurances for the lodging. */ + @SerializedName("insurances") + List insurances; + + /** Whether the renter is a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; + + /** Renter ID number for the lodging. */ + @SerializedName("renter_id_number") + String renterIdNumber; + + /** Renter name for the lodging. */ + @SerializedName("renter_name") + String renterName; + + /** Required. Total details for the lodging. */ + @SerializedName("total") + Total total; + + private LodgingData( + Accommodation accommodation, + Affiliate affiliate, + String bookingNumber, + Long checkinAt, + Long checkoutAt, + String customerServicePhoneNumber, + Map extraParams, + Boolean fireSafetyActComplianceIndicator, + List guests, + Host host, + List insurances, + Boolean noShowIndicator, + String renterIdNumber, + String renterName, + Total total) { + this.accommodation = accommodation; + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.checkinAt = checkinAt; + this.checkoutAt = checkoutAt; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + this.guests = guests; + this.host = host; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.renterIdNumber = renterIdNumber; + this.renterName = renterName; + this.total = total; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Accommodation accommodation; + + private Affiliate affiliate; + + private String bookingNumber; + + private Long checkinAt; + + private Long checkoutAt; + + private String customerServicePhoneNumber; + + private Map extraParams; + + private Boolean fireSafetyActComplianceIndicator; + + private List guests; + + private Host host; + + private List insurances; + + private Boolean noShowIndicator; + + private String renterIdNumber; + + private String renterName; + + private Total total; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.LodgingData build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData( + this.accommodation, + this.affiliate, + this.bookingNumber, + this.checkinAt, + this.checkoutAt, + this.customerServicePhoneNumber, + this.extraParams, + this.fireSafetyActComplianceIndicator, + this.guests, + this.host, + this.insurances, + this.noShowIndicator, + this.renterIdNumber, + this.renterName, + this.total); + } + + /** Accommodation details for the lodging. */ + public Builder setAccommodation( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Accommodation accommodation) { + this.accommodation = accommodation; + return this; + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Booking confirmation number for the lodging. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Required. Check-in date. */ + public Builder setCheckinAt(Long checkinAt) { + this.checkinAt = checkinAt; + return this; + } + + /** Required. Check-out date. */ + public Builder setCheckoutAt(Long checkoutAt) { + this.checkoutAt = checkoutAt; + return this; + } + + /** Customer service phone number for the lodging company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + 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 PaymentIntentCaptureParams.PaymentDetails.LodgingData#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.LodgingData#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + public Builder setFireSafetyActComplianceIndicator( + Boolean fireSafetyActComplianceIndicator) { + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + return this; + } + + /** + * Add an element to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData#guests} for the field + * documentation. + */ + public Builder addGuest( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Guest element) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.add(element); + return this; + } + + /** + * Add all elements to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData#guests} for the field + * documentation. + */ + public Builder addAllGuest( + List elements) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.addAll(elements); + return this; + } + + /** Host details for the lodging. */ + public Builder setHost(PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host host) { + this.host = host; + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Whether the renter is a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } + + /** Renter ID number for the lodging. */ + public Builder setRenterIdNumber(String renterIdNumber) { + this.renterIdNumber = renterIdNumber; + return this; + } + + /** Renter name for the lodging. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total details for the lodging. */ + public Builder setTotal(PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total total) { + this.total = total; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Accommodation { + /** Type of accommodation. */ + @SerializedName("accommodation_type") + AccommodationType accommodationType; + + /** Bed type. */ + @SerializedName("bed_type") + String bedType; + + /** Daily accommodation rate in cents. */ + @SerializedName("daily_rate_amount") + Long dailyRateAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Number of nights. */ + @SerializedName("nights") + Long nights; + + /** Number of rooms, cabanas, apartments, and so on. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; + + /** Rate type. */ + @SerializedName("rate_type") + String rateType; + + /** Whether smoking is allowed. */ + @SerializedName("smoking_indicator") + Boolean smokingIndicator; + + private Accommodation( + AccommodationType accommodationType, + String bedType, + Long dailyRateAmount, + Map extraParams, + Long nights, + Long numberOfRooms, + String rateType, + Boolean smokingIndicator) { + this.accommodationType = accommodationType; + this.bedType = bedType; + this.dailyRateAmount = dailyRateAmount; + this.extraParams = extraParams; + this.nights = nights; + this.numberOfRooms = numberOfRooms; + this.rateType = rateType; + this.smokingIndicator = smokingIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AccommodationType accommodationType; + + private String bedType; + + private Long dailyRateAmount; + + private Map extraParams; + + private Long nights; + + private Long numberOfRooms; + + private String rateType; + + private Boolean smokingIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Accommodation build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Accommodation( + this.accommodationType, + this.bedType, + this.dailyRateAmount, + this.extraParams, + this.nights, + this.numberOfRooms, + this.rateType, + this.smokingIndicator); + } + + /** Type of accommodation. */ + public Builder setAccommodationType( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Accommodation.AccommodationType + accommodationType) { + this.accommodationType = accommodationType; + return this; + } + + /** Bed type. */ + public Builder setBedType(String bedType) { + this.bedType = bedType; + return this; + } + + /** Daily accommodation rate in cents. */ + public Builder setDailyRateAmount(Long dailyRateAmount) { + this.dailyRateAmount = dailyRateAmount; + 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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Accommodation#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Accommodation#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Number of nights. */ + public Builder setNights(Long nights) { + this.nights = nights; + return this; + } + + /** Number of rooms, cabanas, apartments, and so on. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + return this; + } + + /** Rate type. */ + public Builder setRateType(String rateType) { + this.rateType = rateType; + return this; + } + + /** Whether smoking is allowed. */ + public Builder setSmokingIndicator(Boolean smokingIndicator) { + this.smokingIndicator = smokingIndicator; + return this; + } + } + + public enum AccommodationType implements ApiRequestParams.EnumParam { + @SerializedName("apartment") + APARTMENT("apartment"), + + @SerializedName("cabana") + CABANA("cabana"), + + @SerializedName("house") + HOUSE("house"), + + @SerializedName("penthouse") + PENTHOUSE("penthouse"), + + @SerializedName("room") + ROOM("room"), + + @SerializedName("standard") + STANDARD("standard"), + + @SerializedName("suite") + SUITE("suite"), + + @SerializedName("villa") + VILLA("villa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccommodationType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Affiliate partner name. */ + @SerializedName("name") + String name; + + private Affiliate(String code, Map extraParams, String name) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String code; + + private Map extraParams; + + private String name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Affiliate build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Affiliate( + this.code, this.extraParams, this.name); + } + + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + 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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.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; + } + + /** Affiliate partner name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Guest { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Guest's full name. */ + @SerializedName("name") + String name; + + private Guest(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 PaymentIntentCaptureParams.PaymentDetails.LodgingData.Guest build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Guest( + 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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Guest#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Guest#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. Guest's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Host { + /** Address of the host. */ + @SerializedName("address") + Address address; + + /** Host's country of domicile. */ + @SerializedName("country_of_domicile") + String countryOfDomicile; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder setNoShow(Boolean noShow) { - this.noShow = noShow; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Reference number for the host. */ + @SerializedName("host_reference") + String hostReference; + + /** Type of host. */ + @SerializedName("host_type") + HostType hostType; + + /** Name of the lodging property or host. */ + @SerializedName("name") + String name; + + /** Total number of reservations for the host. */ + @SerializedName("number_of_reservations") + Long numberOfReservations; + + /** Property phone number. */ + @SerializedName("property_phone_number") + String propertyPhoneNumber; + + /** Host's registration date. */ + @SerializedName("registered_at") + Long registeredAt; + + private Host( + Address address, + String countryOfDomicile, + Map extraParams, + String hostReference, + HostType hostType, + String name, + Long numberOfReservations, + String propertyPhoneNumber, + Long registeredAt) { + this.address = address; + this.countryOfDomicile = countryOfDomicile; + this.extraParams = extraParams; + this.hostReference = hostReference; + this.hostType = hostType; + this.name = name; + this.numberOfReservations = numberOfReservations; + this.propertyPhoneNumber = propertyPhoneNumber; + this.registeredAt = registeredAt; } - /** The number of rooms on the booking. */ - public Builder setNumberOfRooms(Long numberOfRooms) { - this.numberOfRooms = numberOfRooms; - return this; + public static Builder builder() { + return new Builder(); } - /** - * 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 - * PaymentIntentCaptureParams.PaymentDetails.Lodging#passengers} for the field - * documentation. - */ - public Builder addPassenger( - PaymentIntentCaptureParams.PaymentDetails.Lodging.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); + public static class Builder { + private Address address; + + private String countryOfDomicile; + + private Map extraParams; + + private String hostReference; + + private HostType hostType; + + private String name; + + private Long numberOfReservations; + + private String propertyPhoneNumber; + + private Long registeredAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host( + this.address, + this.countryOfDomicile, + this.extraParams, + this.hostReference, + this.hostType, + this.name, + this.numberOfReservations, + this.propertyPhoneNumber, + this.registeredAt); + } + + /** Address of the host. */ + public Builder setAddress( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host.Address address) { + this.address = address; + return this; } - 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 - * PaymentIntentCaptureParams.PaymentDetails.Lodging#passengers} for the field - * documentation. - */ - public Builder addAllPassenger( - List elements) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); + /** Host's country of domicile. */ + public Builder setCountryOfDomicile(String countryOfDomicile) { + this.countryOfDomicile = countryOfDomicile; + return this; } - this.passengers.addAll(elements); - return this; - } - /** The phone number of the lodging location. */ - public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { - this.propertyPhoneNumber = propertyPhoneNumber; - 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 PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** The room class for this purchase. */ - public Builder setRoomClass(String roomClass) { - this.roomClass = roomClass; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host#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 number of room nights. */ - public Builder setRoomNights(Long roomNights) { - this.roomNights = roomNights; - return this; + /** Reference number for the host. */ + public Builder setHostReference(String hostReference) { + this.hostReference = hostReference; + return this; + } + + /** Type of host. */ + public Builder setHostType( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host.HostType hostType) { + this.hostType = hostType; + return this; + } + + /** Name of the lodging property or host. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Total number of reservations for the host. */ + public Builder setNumberOfReservations(Long numberOfReservations) { + this.numberOfReservations = numberOfReservations; + return this; + } + + /** Property phone number. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } + + /** Host's registration date. */ + public Builder setRegisteredAt(Long registeredAt) { + this.registeredAt = registeredAt; + return this; + } } - /** The total tax amount associating with the room reservation. */ - public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { - this.totalRoomTaxAmount = totalRoomTaxAmount; - return this; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. 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; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** Required. 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 PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host.Address build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. 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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host.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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Host.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; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Required. 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; + } + } } - /** The total tax amount. */ - public Builder setTotalTaxAmount(Long totalTaxAmount) { - this.totalTaxAmount = totalTaxAmount; - return this; + public enum HostType implements ApiRequestParams.EnumParam { + @SerializedName("hostel") + HOSTEL("hostel"), + + @SerializedName("hotel") + HOTEL("hotel"), + + @SerializedName("owner") + OWNER("owner"), + + @SerializedName("rental_agency") + RENTAL_AGENCY("rental_agency"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + HostType(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + public static class Insurance { + /** Required. Price of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; /** * Map of extra parameters for custom features not available in this client library. The @@ -5433,37 +11389,25 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - String line2; - - /** ZIP or postal code. */ - @SerializedName("postal_code") - String postalCode; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - /** State, county, province, or region. */ - @SerializedName("state") - String state; + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - private Address( - String city, - String country, + private Insurance( + Long amount, + String currency, Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { @@ -5471,52 +11415,44 @@ public static Builder builder() { } public static class Builder { - private String city; + private Long amount; - private String country; + private String currency; private Map extraParams; - private String line1; - - private String line2; - - private String postalCode; + private String insuranceCompanyName; - private String state; + private InsuranceType insuranceType; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Lodging.Address build() { - return new PaymentIntentCaptureParams.PaymentDetails.Lodging.Address( - this.city, - this.country, + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Insurance build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Insurance( + this.amount, + this.currency, this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); + this.insuranceCompanyName, + this.insuranceType); } - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; + /** Required. Price of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; return this; } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Lodging.Address#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Insurance#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5529,8 +11465,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Lodging.Address#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Insurance#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5540,35 +11477,66 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; return this; } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; return this; } + } - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Total { + /** Required. Total price of the lodging reservation in cents. */ + @SerializedName("amount") + Long amount; + + /** Cash advances in cents. */ + @SerializedName("cash_advances") + Long cashAdvances; + + /** Currency of the total amount. */ + @SerializedName("currency") + String currency; + + /** Discount details for the lodging. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the lodging. */ + @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. @@ -5579,13 +11547,32 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** Prepaid amount in cents. */ + @SerializedName("prepaid_amount") + Long prepaidAmount; - private Affiliate(Map extraParams, String name) { + /** Tax breakdown for the lodging reservation. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + Long cashAdvances, + String currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Long prepaidAmount, + Tax tax) { + this.amount = amount; + this.cashAdvances = cashAdvances; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.name = name; + this.prepaidAmount = prepaidAmount; + this.tax = tax; } public static Builder builder() { @@ -5593,21 +11580,97 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private Long cashAdvances; + + private String currency; + + private Discounts discounts; + + private List + extraCharges; + private Map extraParams; - private String name; + private Long prepaidAmount; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Lodging.Affiliate build() { - return new PaymentIntentCaptureParams.PaymentDetails.Lodging.Affiliate( - this.extraParams, this.name); + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total( + this.amount, + this.cashAdvances, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.prepaidAmount, + this.tax); + } + + /** Required. Total price of the lodging reservation in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Cash advances in cents. */ + public Builder setCashAdvances(Long cashAdvances) { + this.cashAdvances = cashAdvances; + return this; + } + + /** Currency of the total amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details for the lodging. */ + public Builder setDiscounts( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.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 PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total#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 - * PaymentIntentCaptureParams.PaymentDetails.Lodging.Affiliate#extraParams} for the field + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5622,7 +11685,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.Lodging.Affiliate#extraParams} for the field + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5633,107 +11696,115 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Prepaid amount in cents. */ + public Builder setPrepaidAmount(Long prepaidAmount) { + this.prepaidAmount = prepaidAmount; + return this; + } + + /** Tax breakdown for the lodging reservation. */ + public Builder setTax( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax tax) { + this.tax = tax; return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** Coupon code. */ + @SerializedName("coupon") + String coupon; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Delivery(Map extraParams, Mode mode, Recipient recipient) { - this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; - } + private Discounts( + String corporateClientCode, String coupon, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + } - public static Builder builder() { - return new Builder(); - } + public static Builder builder() { + return new Builder(); + } - public static class Builder { - private Map extraParams; + public static class Builder { + private String corporateClientCode; - private Mode mode; + private String coupon; - private Recipient recipient; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery build() { - return new PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery( - this.extraParams, this.mode, this.recipient); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Discounts build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Discounts( + this.corporateClientCode, this.coupon, 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 PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Coupon code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + 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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; } - this.extraParams.putAll(map); - return this; - } - - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Mode mode) { - this.mode = mode; - return this; - } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { - this.recipient = recipient; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Discounts#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 @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class ExtraCharge { + /** Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; /** * Map of extra parameters for custom features not available in this client library. The @@ -5745,20 +11816,14 @@ public static class Recipient { @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; + /** Type of extra charge. */ + @SerializedName("type") + Type type; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.type = type; } public static Builder builder() { @@ -5766,23 +11831,21 @@ public static Builder builder() { } public static class Builder { - private String email; + private Long amount; private Map extraParams; - private String name; - - private String phone; + private Type type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient build() { - return new PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; return this; } @@ -5790,8 +11853,8 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5805,8 +11868,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5816,161 +11879,257 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** Type of extra charge. */ + public Builder setType( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.ExtraCharge.Type type) { + this.type = type; 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 Type 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("phone") + PHONE("phone"), + + @SerializedName("restaurant") + RESTAURANT("restaurant"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; } } } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), - - @SerializedName("phone") - PHONE("phone"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Indicates whether the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - @SerializedName("post") - POST("post"); + /** Tax details. */ + @SerializedName("taxes") + List taxes; - @Getter(onMethod_ = {@Override}) - private final String value; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - Mode(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static class Builder { + private Map extraParams; - /** - * Required. Full name of the person or entity on the lodging reservation. - */ - @SerializedName("name") - String name; + private Boolean taxExemptIndicator; - private Passenger(Map extraParams, String name) { - this.extraParams = extraParams; - this.name = name; - } + private List taxes; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - public static class Builder { - private Map 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 + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.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; + } - private String name; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.Lodging.Passenger build() { - return new PaymentIntentCaptureParams.PaymentDetails.Lodging.Passenger( - this.extraParams, this.name); - } + /** Indicates whether the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + 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 - * PaymentIntentCaptureParams.PaymentDetails.Lodging.Passenger#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.Lodging.Passenger#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List + elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; } - 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; - } - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount in cents. */ + @SerializedName("amount") + Long amount; - public enum Category implements ApiRequestParams.EnumParam { - @SerializedName("hotel") - HOTEL("hotel"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + String type; + + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - @SerializedName("vacation_rental") - VACATION_RENTAL("vacation_rental"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private Long amount; - Category(String value) { - this.value = value; - } - } + private Map extraParams; - public enum ExtraCharge implements ApiRequestParams.EnumParam { - @SerializedName("gift_shop") - GIFT_SHOP("gift_shop"), + private Long rate; - @SerializedName("laundry") - LAUNDRY("laundry"), + private String type; - @SerializedName("mini_bar") - MINI_BAR("mini_bar"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - @SerializedName("other") - OTHER("other"), + /** Tax amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - @SerializedName("restaurant") - RESTAURANT("restaurant"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.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; + } - @SerializedName("telephone") - TELEPHONE("telephone"); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.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(onMethod_ = {@Override}) - private final String value; + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } - ExtraCharge(String value) { - this.value = value; + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } } } } diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 63d7ba7b21d..882b375457a 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -2665,6 +2665,10 @@ public static class PaymentDetails { @SerializedName("car_rental") CarRental carRental; + /** Car rental data for this PaymentIntent. */ + @SerializedName("car_rental_data") + Object carRentalData; + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -2691,10 +2695,18 @@ public static class PaymentDetails { @SerializedName("flight") Flight flight; + /** Flight data for this PaymentIntent. */ + @SerializedName("flight_data") + Object flightData; + /** Lodging reservation details for this PaymentIntent. */ @SerializedName("lodging") Lodging lodging; + /** Lodging data for this PaymentIntent. */ + @SerializedName("lodging_data") + Object lodgingData; + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -2716,19 +2728,25 @@ public static class PaymentDetails { private PaymentDetails( CarRental carRental, + Object carRentalData, Object customerReference, EventDetails eventDetails, Map extraParams, Flight flight, + Object flightData, Lodging lodging, + Object lodgingData, Object orderReference, Subscription subscription) { this.carRental = carRental; + this.carRentalData = carRentalData; this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; this.flight = flight; + this.flightData = flightData; this.lodging = lodging; + this.lodgingData = lodgingData; this.orderReference = orderReference; this.subscription = subscription; } @@ -2740,6 +2758,8 @@ public static Builder builder() { public static class Builder { private CarRental carRental; + private Object carRentalData; + private Object customerReference; private EventDetails eventDetails; @@ -2748,8 +2768,12 @@ public static class Builder { private Flight flight; + private Object flightData; + private Lodging lodging; + private Object lodgingData; + private Object orderReference; private Subscription subscription; @@ -2758,11 +2782,14 @@ public static class Builder { public PaymentIntentConfirmParams.PaymentDetails build() { return new PaymentIntentConfirmParams.PaymentDetails( this.carRental, + this.carRentalData, this.customerReference, this.eventDetails, this.extraParams, this.flight, + this.flightData, this.lodging, + this.lodgingData, this.orderReference, this.subscription); } @@ -2773,6 +2800,53 @@ public Builder setCarRental(PaymentIntentConfirmParams.PaymentDetails.CarRental return this; } + /** + * Add an element to `carRentalData` 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#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCarRentalData( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData element) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = + new ArrayList(); + } + ((List) this.carRentalData) + .add(element); + return this; + } + + /** + * Add all elements to `carRentalData` 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#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCarRentalData( + List elements) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = + new ArrayList(); + } + ((List) this.carRentalData) + .addAll(elements); + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData(EmptyParam carRentalData) { + this.carRentalData = carRentalData; + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData( + List carRentalData) { + this.carRentalData = carRentalData; + return this; + } + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -2835,12 +2909,99 @@ public Builder setFlight(PaymentIntentConfirmParams.PaymentDetails.Flight flight return this; } + /** + * Add an element to `flightData` 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#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFlightData(PaymentIntentConfirmParams.PaymentDetails.FlightData element) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData).add(element); + return this; + } + + /** + * Add all elements to `flightData` 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#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFlightData( + List elements) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData) + .addAll(elements); + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData(EmptyParam flightData) { + this.flightData = flightData; + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData( + List flightData) { + this.flightData = flightData; + return this; + } + /** Lodging reservation details for this PaymentIntent. */ public Builder setLodging(PaymentIntentConfirmParams.PaymentDetails.Lodging lodging) { this.lodging = lodging; return this; } + /** + * Add an element to `lodgingData` 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#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLodgingData(PaymentIntentConfirmParams.PaymentDetails.LodgingData element) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData) + .add(element); + return this; + } + + /** + * Add all elements to `lodgingData` 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#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLodgingData( + List elements) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData) + .addAll(elements); + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData(EmptyParam lodgingData) { + this.lodgingData = lodgingData; + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData( + List lodgingData) { + this.lodgingData = lodgingData; + return this; + } + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -4228,30 +4389,38 @@ public enum RateInterval implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - 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. */ + public static class CarRentalData { + /** Affiliate (such as travel agency) details for the rental. */ @SerializedName("affiliate") Affiliate affiliate; - /** The name of the company. */ - @SerializedName("company") - String company; + /** Booking confirmation number for the car rental. */ + @SerializedName("booking_number") + String bookingNumber; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** Name of the car rental company. */ + @SerializedName("carrier_name") + String carrierName; - /** Event end time. Measured in seconds since the Unix epoch. */ - @SerializedName("ends_at") - Long endsAt; + /** Customer service phone number for the car rental company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** Number of days the car is being rented. */ + @SerializedName("days_rented") + Long daysRented; + + /** Distance details for the rental. */ + @SerializedName("distance") + Distance distance; + + /** List of drivers for the rental. */ + @SerializedName("drivers") + List drivers; + + /** Required. Drop-off location details. */ + @SerializedName("drop_off") + DropOff dropOff; /** * Map of extra parameters for custom features not available in this client library. The @@ -4262,39 +4431,61 @@ public static class EventDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Type of the event entertainment (concert, sports event etc). */ - @SerializedName("genre") - String genre; + /** Insurance details for the rental. */ + @SerializedName("insurances") + List insurances; - /** Required. The name of the event. */ - @SerializedName("name") - String name; + /** Indicates if the customer was a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; - /** Event start time. Measured in seconds since the Unix epoch. */ - @SerializedName("starts_at") - Long startsAt; + /** Required. Pickup location details. */ + @SerializedName("pickup") + Pickup pickup; - private EventDetails( - Boolean accessControlledVenue, - Address address, + /** Name of the person renting the vehicle. */ + @SerializedName("renter_name") + String renterName; + + /** Required. Total cost breakdown for the rental. */ + @SerializedName("total") + Total total; + + /** Vehicle details for the rental. */ + @SerializedName("vehicle") + Vehicle vehicle; + + private CarRentalData( Affiliate affiliate, - String company, - Delivery delivery, - Long endsAt, + String bookingNumber, + String carrierName, + String customerServicePhoneNumber, + Long daysRented, + Distance distance, + List drivers, + DropOff dropOff, Map extraParams, - String genre, - String name, - Long startsAt) { - this.accessControlledVenue = accessControlledVenue; - this.address = address; + List insurances, + Boolean noShowIndicator, + Pickup pickup, + String renterName, + Total total, + Vehicle vehicle) { this.affiliate = affiliate; - this.company = company; - this.delivery = delivery; - this.endsAt = endsAt; + this.bookingNumber = bookingNumber; + this.carrierName = carrierName; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.daysRented = daysRented; + this.distance = distance; + this.drivers = drivers; + this.dropOff = dropOff; this.extraParams = extraParams; - this.genre = genre; - this.name = name; - this.startsAt = startsAt; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.pickup = pickup; + this.renterName = renterName; + this.total = total; + this.vehicle = vehicle; } public static Builder builder() { @@ -4302,84 +4493,135 @@ public static Builder builder() { } public static class Builder { - private Boolean accessControlledVenue; + private Affiliate affiliate; - private Address address; + private String bookingNumber; - private Affiliate affiliate; + private String carrierName; - private String company; + private String customerServicePhoneNumber; - private Delivery delivery; + private Long daysRented; - private Long endsAt; + private Distance distance; + + private List drivers; + + private DropOff dropOff; private Map extraParams; - private String genre; + private List insurances; - private String name; + private Boolean noShowIndicator; - private Long startsAt; + private Pickup pickup; + + private String renterName; + + private Total total; + + private Vehicle vehicle; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.EventDetails build() { - return new PaymentIntentConfirmParams.PaymentDetails.EventDetails( - this.accessControlledVenue, - this.address, + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData( this.affiliate, - this.company, - this.delivery, - this.endsAt, + this.bookingNumber, + this.carrierName, + this.customerServicePhoneNumber, + this.daysRented, + this.distance, + this.drivers, + this.dropOff, this.extraParams, - this.genre, - this.name, - this.startsAt); + this.insurances, + this.noShowIndicator, + this.pickup, + this.renterName, + this.total, + this.vehicle); } - /** Indicates if the tickets are digitally checked when entering the venue. */ - public Builder setAccessControlledVenue(Boolean accessControlledVenue) { - this.accessControlledVenue = accessControlledVenue; + /** Affiliate (such as travel agency) details for the rental. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - /** The event location's address. */ - public Builder setAddress( - PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address address) { - this.address = address; + /** Booking confirmation number for the car rental. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate affiliate) { - this.affiliate = affiliate; + /** Name of the car rental company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; return this; } - /** The name of the company. */ - public Builder setCompany(String company) { - this.company = company; + /** Customer service phone number for the car rental company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; return this; } - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery delivery) { - this.delivery = delivery; + /** Number of days the car is being rented. */ + public Builder setDaysRented(Long daysRented) { + this.daysRented = daysRented; return this; } - /** Event end time. Measured in seconds since the Unix epoch. */ - public Builder setEndsAt(Long endsAt) { - this.endsAt = endsAt; + /** Distance details for the rental. */ + public Builder setDistance( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Distance distance) { + this.distance = distance; + 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.CarRentalData#drivers} for the field + * documentation. + */ + public Builder addDriver( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.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.CarRentalData#drivers} for the field + * documentation. + */ + public Builder addAllDriver( + List elements) { + if (this.drivers == null) { + this.drivers = new ArrayList<>(); + } + this.drivers.addAll(elements); + return this; + } + + /** Required. Drop-off location details. */ + public Builder setDropOff( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.DropOff dropOff) { + this.dropOff = dropOff; 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 + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.CarRentalData#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4393,7 +4635,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentDetails.EventDetails#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.CarRentalData#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4404,38 +4646,76 @@ public Builder putAllExtraParam(Map 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; + /** + * Add an element to `insurances` 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.CarRentalData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** Event start time. Measured in seconds since the Unix epoch. */ - public Builder setStartsAt(Long startsAt) { - this.startsAt = startsAt; + /** + * Add all elements to `insurances` 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.CarRentalData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Indicates if the customer was a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } + + /** Required. Pickup location details. */ + public Builder setPickup( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup pickup) { + this.pickup = pickup; + return this; + } + + /** Name of the person renting the vehicle. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total cost breakdown for the rental. */ + public Builder setTotal( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total total) { + this.total = total; + return this; + } + + /** Vehicle details for the rental. */ + public Builder setVehicle( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Vehicle vehicle) { + this.vehicle = vehicle; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - 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; + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; /** * Map of extra parameters for custom features not available in this client library. The @@ -4447,37 +4727,14 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the 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; + /** Name of affiliate partner. */ + @SerializedName("name") + String name; - private Address( - String city, - String country, - Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + private Affiliate(String code, Map extraParams, String name) { + this.code = code; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.name = name; } public static Builder builder() { @@ -4485,44 +4742,21 @@ public static Builder builder() { } public static class Builder { - private String city; - - private String country; + private String code; private Map extraParams; - private String line1; - - private String line2; - - private String postalCode; - - private String state; + private String name; /** 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; + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Affiliate( + this.code, this.extraParams, this.name); } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; return this; } @@ -4530,7 +4764,7 @@ public Builder setCountry(String country) { * Add a key/value pair to `extraParams` map. 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 + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Affiliate#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4545,7 +4779,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address#extraParams} for the + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Affiliate#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4556,27 +4790,9 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } - - /** Address line 2, such as the 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; + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; return this; } } @@ -4584,7 +4800,11 @@ public Builder setState(String state) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Distance { + /** Required. Distance traveled. */ + @SerializedName("amount") + Long amount; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -4595,13 +4815,17 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + @SerializedName("unit") + Unit unit; - private Affiliate(Map extraParams, String name) { + private Distance(Long amount, Map extraParams, Unit unit) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; + this.unit = unit; } public static Builder builder() { @@ -4609,21 +4833,29 @@ public static Builder builder() { } public static class Builder { + private Long amount; + private Map extraParams; - private String name; + private Unit unit; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate build() { - return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate( - this.extraParams, this.name); + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Distance build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Distance( + this.amount, this.extraParams, this.unit); + } + + /** Required. Distance traveled. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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.Affiliate#extraParams} for the + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Distance#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4638,7 +4870,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Distance#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4649,17 +4881,48 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + public Builder setUnit( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Distance.Unit unit) { + this.unit = unit; return this; } } + + public enum Unit implements ApiRequestParams.EnumParam { + @SerializedName("kilometers") + KILOMETERS("kilometers"), + + @SerializedName("miles") + MILES("miles"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Unit(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Driver { + /** Driver's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Driver's identification number. */ + @SerializedName("driver_identification_number") + String driverIdentificationNumber; + + /** Driver's tax number. */ + @SerializedName("driver_tax_number") + String driverTaxNumber; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -4670,18 +4933,21 @@ public static class Delivery { @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; + /** Required. Driver's full name. */ + @SerializedName("name") + String name; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Driver( + DateOfBirth dateOfBirth, + String driverIdentificationNumber, + String driverTaxNumber, + Map extraParams, + String name) { + this.dateOfBirth = dateOfBirth; + this.driverIdentificationNumber = driverIdentificationNumber; + this.driverTaxNumber = driverTaxNumber; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.name = name; } public static Builder builder() { @@ -4689,23 +4955,51 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; + private DateOfBirth dateOfBirth; - private Mode mode; + private String driverIdentificationNumber; - private Recipient recipient; + private String driverTaxNumber; + + private Map extraParams; + + private String name; /** 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); + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver( + this.dateOfBirth, + this.driverIdentificationNumber, + this.driverTaxNumber, + this.extraParams, + this.name); + } + + /** Driver's date of birth. */ + public Builder setDateOfBirth( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver.DateOfBirth + dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Driver's identification number. */ + public Builder setDriverIdentificationNumber(String driverIdentificationNumber) { + this.driverIdentificationNumber = driverIdentificationNumber; + return this; + } + + /** Driver's tax number. */ + public Builder setDriverTaxNumber(String driverTaxNumber) { + this.driverTaxNumber = driverTaxNumber; + 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#extraParams} for the + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4720,7 +5014,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4731,27 +5025,19 @@ public Builder putAllExtraParam(Map 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; + /** Required. Driver's full name. */ + public Builder setName(String name) { + this.name = name; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class DateOfBirth { + /** Required. Day of birth (1-31). */ + @SerializedName("day") + Long day; /** * Map of extra parameters for custom features not available in this client library. The @@ -4763,20 +5049,19 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + /** Required. Month of birth (1-12). */ + @SerializedName("month") + Long month; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + /** Required. Year of birth (must be greater than 1900). */ + @SerializedName("year") + Long year; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.month = month; + this.year = year; } public static Builder builder() { @@ -4784,24 +5069,24 @@ public static Builder builder() { } public static class Builder { - private String email; + private Long day; private Map extraParams; - private String name; + private Long month; - private String phone; + private Long year; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver.DateOfBirth build() { - return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver.DateOfBirth( + this.day, this.extraParams, this.month, this.year); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. Day of birth (1-31). */ + public Builder setDay(Long day) { + this.day = day; return this; } @@ -4809,7 +5094,7 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. 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} + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4824,7 +5109,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4835,283 +5120,299 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** Required. Month of birth (1-12). */ + public Builder setMonth(Long month) { + this.month = month; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Required. Year of birth (must be greater than 1900). */ + public Builder setYear(Long year) { + this.year = year; return this; } } } + } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DropOff { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; - @SerializedName("phone") - PHONE("phone"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Location name. */ + @SerializedName("location_name") + String locationName; - @SerializedName("post") - POST("post"); + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - @Getter(onMethod_ = {@Override}) - private final String value; + private DropOff( + Address address, Map extraParams, String locationName, Long time) { + this.address = address; + this.extraParams = extraParams; + this.locationName = locationName; + this.time = time; + } - Mode(String value) { - this.value = value; - } + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Flight { - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + public static class Builder { + private Address address; - /** - * 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; + private Map extraParams; - /** - * The International Air Transport Association (IATA) carrier code of the carrier that issued - * the ticket. - */ - @SerializedName("carrier") - String carrier; + private String locationName; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + private Long time; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.DropOff build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.DropOff( + this.address, this.extraParams, this.locationName, this.time); + } - /** The name of the person or entity on the reservation. */ - @SerializedName("passenger_name") - String passengerName; + /** Required. Address of the rental location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.DropOff.Address address) { + this.address = address; + return this; + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** + * Add a key/value pair to `extraParams` map. 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.CarRentalData.DropOff#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Required. The individual flight segments associated with the trip. */ - @SerializedName("segments") - List segments; + /** + * Add all map key/value pairs to `extraParams` map. 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.CarRentalData.DropOff#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 ticket number associated with the travel reservation. */ - @SerializedName("ticket_number") - String ticketNumber; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; + return this; + } - 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; - } + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; + return this; + } + } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - public static class Builder { - private Affiliate affiliate; + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - private String agencyNumber; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 String carrier; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - private Delivery delivery; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Map extraParams; + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; - private String passengerName; + /** State, county, province, or region. */ + @SerializedName("state") + String state; - private List passengers; + 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; + } - private List segments; + public static Builder builder() { + return new Builder(); + } - private String ticketNumber; + public static class Builder { + private String city; - /** 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); - } + private String country; - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + private Map extraParams; - /** - * 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; - } + private String line1; - /** - * 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; - } + private String line2; - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery delivery) { - this.delivery = delivery; - return this; - } + private String postalCode; - /** - * Add a key/value pair to `extraParams` map. 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; - } + private String state; - /** - * Add all map key/value pairs to `extraParams` map. 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.DropOff.Address build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.DropOff.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - /** The name of the person or entity on the reservation. */ - public Builder setPassengerName(String passengerName) { - this.passengerName = passengerName; - return this; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + 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; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + 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 a key/value pair to `extraParams` map. 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.CarRentalData.DropOff.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 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 map key/value pairs to `extraParams` map. 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.CarRentalData.DropOff.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; + } - /** - * 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; - } + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } - /** The ticket number associated with the travel reservation. */ - public Builder setTicketNumber(String ticketNumber) { - this.ticketNumber = ticketNumber; - return this; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Required. 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 @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Insurance { + /** Required. Amount of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5122,13 +5423,25 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - private Affiliate(Map extraParams, String name) { + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.name = name; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { @@ -5136,21 +5449,44 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private String currency; + private Map extraParams; - private String name; + private String insuranceCompanyName; + + private InsuranceType insuranceType; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate build() { - return new PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate( - this.extraParams, this.name); + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Insurance build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Amount of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Insurance#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5163,8 +5499,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Insurance#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5174,19 +5511,58 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; return this; } } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("liability_supplement") + LIABILITY_SUPPLEMENT("liability_supplement"), + + @SerializedName("loss_damage_waiver") + LOSS_DAMAGE_WAIVER("loss_damage_waiver"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_damage_waiver") + PARTIAL_DAMAGE_WAIVER("partial_damage_waiver"), + + @SerializedName("personal_accident") + PERSONAL_ACCIDENT("personal_accident"), + + @SerializedName("personal_effects") + PERSONAL_EFFECTS("personal_effects"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { - /** - * Map of extra parameters for custom features not available in this client library. The + public static class Pickup { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-level field * (serialized) name in this param object. Effectively, this map is flattened to its parent @@ -5195,18 +5571,20 @@ public static class Delivery { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** Location name. */ + @SerializedName("location_name") + String locationName; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Pickup( + Address address, Map extraParams, String locationName, Long time) { + this.address = address; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.locationName = locationName; + this.time = time; } public static Builder builder() { @@ -5214,23 +5592,33 @@ public static Builder builder() { } public static class Builder { + private Address address; + private Map extraParams; - private Mode mode; + private String locationName; - private Recipient recipient; + private Long time; /** 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); + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup( + this.address, this.extraParams, this.locationName, this.time); + } + + /** Required. Address of the rental location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup.Address address) { + this.address = address; + 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#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5243,8 +5631,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5254,27 +5643,32 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Mode mode) { - this.mode = mode; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; return this; } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. 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 @@ -5286,20 +5680,39 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + /** Required. 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.name = name; - this.phone = phone; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } public static Builder builder() { @@ -5307,23 +5720,44 @@ public static Builder builder() { } public static class Builder { - private String email; + private String city; + + private String country; private Map extraParams; - private String name; + private String line1; - private String phone; + private String line2; + + private String postalCode; + + private String state; /** 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); + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup.Address build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; return this; } @@ -5331,8 +5765,8 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. 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. + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5346,8 +5780,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5357,45 +5791,56 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; 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; + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - Mode(String value) { - this.value = value; + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Passenger { + public static class Total { + /** Required. Total amount in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the amount. */ + @SerializedName("currency") + String currency; + + /** Discount details for the rental. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the rental. */ + @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. @@ -5406,15 +5851,36 @@ public static class Passenger { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. Full name of the person or entity on the flight reservation. - */ - @SerializedName("name") - String name; + /** Rate per unit for the rental. */ + @SerializedName("rate_per_unit") + Long ratePerUnit; - private Passenger(Map extraParams, String name) { + /** Unit of measurement for the rate. */ + @SerializedName("rate_unit") + RateUnit rateUnit; + + /** Tax breakdown for the rental. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + String currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Long ratePerUnit, + RateUnit rateUnit, + Tax tax) { + this.amount = amount; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.name = name; + this.ratePerUnit = ratePerUnit; + this.rateUnit = rateUnit; + this.tax = tax; } public static Builder builder() { @@ -5422,21 +5888,92 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private String currency; + + private Discounts discounts; + + private List + extraCharges; + private Map extraParams; - private String name; + private Long ratePerUnit; + + private RateUnit rateUnit; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger build() { - return new PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger( - this.extraParams, this.name); + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total( + this.amount, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.ratePerUnit, + this.rateUnit, + this.tax); + } + + /** Required. Total amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details for the rental. */ + public Builder setDiscounts( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Discounts discounts) { + this.discounts = discounts; + 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.CarRentalData.Total#extraCharges} for the + * field documentation. + */ + public Builder addExtraCharge( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.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.CarRentalData.Total#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.Flight.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5449,8 +5986,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5460,1132 +5998,1008 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Full name of the person or entity on the flight reservation. - */ - public Builder setName(String name) { - this.name = name; + /** Rate per unit for the rental. */ + public Builder setRatePerUnit(Long ratePerUnit) { + this.ratePerUnit = ratePerUnit; return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** Unit of measurement for the rate. */ + public Builder setRateUnit( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.RateUnit rateUnit) { + this.rateUnit = rateUnit; + return this; + } - /** - * Required. The departure time for the flight segment. Measured in seconds - * since the Unix epoch. - */ - @SerializedName("departs_at") - Long departsAt; + /** Tax breakdown for the rental. */ + public Builder setTax( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax tax) { + this.tax = tax; + return this; + } + } - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - @SerializedName("departure_airport") - String departureAirport; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Coupon code applied to the rental. */ + @SerializedName("coupon") + String coupon; - /** The flight number associated with the segment. */ - @SerializedName("flight_number") - String flightNumber; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 fare class for the segment. */ - @SerializedName("service_class") - ServiceClass serviceClass; + /** Maximum number of free miles or kilometers included. */ + @SerializedName("maximum_free_miles_or_kilometers") + Long maximumFreeMilesOrKilometers; - 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; - } + private Discounts( + String corporateClientCode, + String coupon, + Map extraParams, + Long maximumFreeMilesOrKilometers) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + } - public static Builder builder() { - return new Builder(); - } + public static Builder builder() { + return new Builder(); + } - public static class Builder { - private Long amount; + public static class Builder { + private String corporateClientCode; - private String arrivalAirport; + private String coupon; - private Long arrivesAt; + private Map extraParams; - private String carrier; + private Long maximumFreeMilesOrKilometers; - private Long departsAt; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Discounts build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Discounts( + this.corporateClientCode, + this.coupon, + this.extraParams, + this.maximumFreeMilesOrKilometers); + } - private String departureAirport; + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - private Map extraParams; + /** Coupon code applied to the rental. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } - private String flightNumber; + /** + * Add a key/value pair to `extraParams` map. 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.CarRentalData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private ServiceClass serviceClass; + /** + * Add all map key/value pairs to `extraParams` map. 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.CarRentalData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** 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); + /** Maximum number of free miles or kilometers included. */ + public Builder setMaximumFreeMilesOrKilometers(Long maximumFreeMilesOrKilometers) { + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + return this; + } } + } - /** The flight segment amount. */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Required. Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; /** - * The International Air Transport Association (IATA) airport code for the arrival - * airport. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. */ - public Builder setArrivalAirport(String arrivalAirport) { - this.arrivalAirport = arrivalAirport; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ - public Builder setArrivesAt(Long arrivesAt) { - this.arrivesAt = arrivesAt; - return this; - } + /** Required. Type of extra charge. */ + @SerializedName("type") + Type type; - /** - * 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; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - public Builder setDepartureAirport(String departureAirport) { - this.departureAirport = departureAirport; - return this; - } + public static class Builder { + private Long amount; - /** - * Add a key/value pair to `extraParams` map. 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<>(); + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.ExtraCharge + build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + /** Required. Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; } - this.extraParams.putAll(map); - return this; - } - /** The flight number associated with the segment. */ - public Builder setFlightNumber(String flightNumber) { - this.flightNumber = flightNumber; - 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.CarRentalData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** The fare class for the segment. */ - public Builder setServiceClass( - PaymentIntentConfirmParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { - this.serviceClass = serviceClass; - return this; + /** + * Add all map key/value pairs to `extraParams` map. 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.CarRentalData.Total.ExtraCharge#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. Type of extra charge. */ + public Builder setType( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.ExtraCharge.Type + type) { + this.type = type; + return this; + } } - } - public enum ServiceClass implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("extra_mileage") + EXTRA_MILEAGE("extra_mileage"), - @SerializedName("economy") - ECONOMY("economy"), + @SerializedName("gas") + GAS("gas"), - @SerializedName("first") - FIRST("first"), + @SerializedName("gps") + GPS("gps"), - @SerializedName("premium_economy") - PREMIUM_ECONOMY("premium_economy"); + @SerializedName("late_charge") + LATE_CHARGE("late_charge"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("one_way_drop_off") + ONE_WAY_DROP_OFF("one_way_drop_off"), - ServiceClass(String value) { - this.value = value; + @SerializedName("other") + OTHER("other"), + + @SerializedName("parking") + PARKING("parking"), + + @SerializedName("phone") + PHONE("phone"), + + @SerializedName("regular_mileage") + REGULAR_MILEAGE("regular_mileage"), + + @SerializedName("towing") + TOWING("towing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Lodging { - /** The lodging location's address. */ - @SerializedName("address") - Address address; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 number of adults on the booking. */ - @SerializedName("adults") - Long adults; + /** Indicates if the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; - /** The booking number associated with the lodging reservation. */ - @SerializedName("booking_number") - String bookingNumber; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - /** The lodging category. */ - @SerializedName("category") - Category category; + public static Builder builder() { + return new Builder(); + } - /** - * Required. Lodging check-in time. Measured in seconds since the Unix epoch. - */ - @SerializedName("checkin_at") - Long checkinAt; + public static class Builder { + private Map extraParams; - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - @SerializedName("checkout_at") - Long checkoutAt; + private Boolean taxExemptIndicator; - /** The customer service phone number of the lodging company. */ - @SerializedName("customer_service_phone_number") - String customerServicePhoneNumber; + private List + taxes; - /** The daily lodging room rate. */ - @SerializedName("daily_room_rate_amount") - Long dailyRoomRateAmount; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** + * Add a key/value pair to `extraParams` map. 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.CarRentalData.Total.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; + } - /** List of additional charges being billed. */ - @SerializedName("extra_charges") - List extraCharges; + /** + * Add all map key/value pairs to `extraParams` map. 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.CarRentalData.Total.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; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } - /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ - @SerializedName("fire_safety_act_compliance") - Boolean fireSafetyActCompliance; + /** + * Add an element to `taxes` 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.CarRentalData.Total.Tax#taxes} for the + * field documentation. + */ + public Builder addTax( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - /** The name of the lodging location. */ - @SerializedName("name") - String name; + /** + * Add all elements to `taxes` 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.CarRentalData.Total.Tax#taxes} for the + * field documentation. + */ + public Builder addAllTax( + List + elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } - /** - * Indicates if the customer did not keep their booking while failing to cancel the - * reservation. - */ - @SerializedName("no_show") - Boolean noShow; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; - /** The number of rooms on the booking. */ - @SerializedName("number_of_rooms") - Long numberOfRooms; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** Tax rate applied. */ + @SerializedName("rate") + Long rate; - /** The phone number of the lodging location. */ - @SerializedName("property_phone_number") - String propertyPhoneNumber; + /** Type of tax applied. */ + @SerializedName("type") + String type; - /** The room class for this purchase. */ - @SerializedName("room_class") - String roomClass; + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - /** The number of room nights. */ - @SerializedName("room_nights") - Long roomNights; + public static Builder builder() { + return new Builder(); + } - /** The total tax amount associating with the room reservation. */ - @SerializedName("total_room_tax_amount") - Long totalRoomTaxAmount; + public static class Builder { + private Long amount; - /** The total tax amount. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; + private Map extraParams; - 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 Long rate; - private Affiliate affiliate; + private String type; - private String bookingNumber; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - private Category category; + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - private Long checkinAt; + /** + * Add a key/value pair to `extraParams` map. 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.CarRentalData.Total.Tax.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; + } - private Long checkoutAt; + /** + * Add all map key/value pairs to `extraParams` map. 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.CarRentalData.Total.Tax.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; + } - private String customerServicePhoneNumber; + /** Tax rate applied. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } - private Long dailyRoomRateAmount; + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } + } - private Delivery delivery; + public enum RateUnit implements ApiRequestParams.EnumParam { + @SerializedName("days") + DAYS("days"), - private List extraCharges; + @SerializedName("kilometers") + KILOMETERS("kilometers"), - private Map extraParams; + @SerializedName("miles") + MILES("miles"), - private Boolean fireSafetyActCompliance; + @SerializedName("months") + MONTHS("months"), - private String name; + @SerializedName("weeks") + WEEKS("weeks"); - private Boolean noShow; + @Getter(onMethod_ = {@Override}) + private final String value; - private Long numberOfRooms; + RateUnit(String value) { + this.value = value; + } + } + } - private List passengers; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vehicle { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 String propertyPhoneNumber; + /** Make of the rental vehicle. */ + @SerializedName("make") + String make; - private String roomClass; + /** Model of the rental vehicle. */ + @SerializedName("model") + String model; - private Long roomNights; + /** Odometer reading at the time of rental. */ + @SerializedName("odometer") + Long odometer; - private Long totalRoomTaxAmount; + /** Type of the rental vehicle. */ + @SerializedName("type") + Type type; - private Long totalTaxAmount; + /** Class of the rental vehicle. */ + @SerializedName("vehicle_class") + VehicleClass vehicleClass; - /** 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); - } + /** Vehicle identification number (VIN). */ + @SerializedName("vehicle_identification_number") + String vehicleIdentificationNumber; - /** The lodging location's address. */ - public Builder setAddress( - PaymentIntentConfirmParams.PaymentDetails.Lodging.Address address) { - this.address = address; - return this; + private Vehicle( + Map extraParams, + String make, + String model, + Long odometer, + Type type, + VehicleClass vehicleClass, + String vehicleIdentificationNumber) { + this.extraParams = extraParams; + this.make = make; + this.model = model; + this.odometer = odometer; + this.type = type; + this.vehicleClass = vehicleClass; + this.vehicleIdentificationNumber = vehicleIdentificationNumber; } - /** The number of adults on the booking. */ - public Builder setAdults(Long adults) { - this.adults = adults; - return this; + public static Builder builder() { + return new Builder(); } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + public static class Builder { + private Map extraParams; - /** The booking number associated with the lodging reservation. */ - public Builder setBookingNumber(String bookingNumber) { - this.bookingNumber = bookingNumber; - return this; - } + private String make; - /** The lodging category. */ - public Builder setCategory( - PaymentIntentConfirmParams.PaymentDetails.Lodging.Category category) { - this.category = category; - return this; - } + private String model; - /** - * Required. Lodging check-in time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckinAt(Long checkinAt) { - this.checkinAt = checkinAt; - return this; - } + private Long odometer; - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckoutAt(Long checkoutAt) { - this.checkoutAt = checkoutAt; - return this; - } + private Type type; - /** The customer service phone number of the lodging company. */ - public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { - this.customerServicePhoneNumber = customerServicePhoneNumber; - return this; - } + private VehicleClass vehicleClass; - /** The daily lodging room rate. */ - public Builder setDailyRoomRateAmount(Long dailyRoomRateAmount) { - this.dailyRoomRateAmount = dailyRoomRateAmount; - return this; - } + private String vehicleIdentificationNumber; - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery delivery) { - this.delivery = delivery; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Vehicle build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Vehicle( + this.extraParams, + this.make, + this.model, + this.odometer, + this.type, + this.vehicleClass, + this.vehicleIdentificationNumber); + } - /** - * 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<>(); + /** + * Add a key/value pair to `extraParams` map. 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.CarRentalData.Vehicle#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; } - 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<>(); + /** + * Add all map key/value pairs to `extraParams` map. 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.CarRentalData.Vehicle#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; } - 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<>(); + /** Make of the rental vehicle. */ + public Builder setMake(String make) { + this.make = make; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + /** Model of the rental vehicle. */ + public Builder setModel(String model) { + this.model = model; + return this; } - 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; - } + /** Odometer reading at the time of rental. */ + public Builder setOdometer(Long odometer) { + this.odometer = odometer; + return this; + } - /** The number of rooms on the booking. */ - public Builder setNumberOfRooms(Long numberOfRooms) { - this.numberOfRooms = numberOfRooms; - return this; - } + /** Type of the rental vehicle. */ + public Builder setType( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Vehicle.Type type) { + this.type = type; + 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<>(); + /** Class of the rental vehicle. */ + public Builder setVehicleClass( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Vehicle.VehicleClass + vehicleClass) { + this.vehicleClass = vehicleClass; + return this; } - 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<>(); + /** Vehicle identification number (VIN). */ + public Builder setVehicleIdentificationNumber(String vehicleIdentificationNumber) { + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + return this; } - this.passengers.addAll(elements); - return this; } - /** The phone number of the lodging location. */ - public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { - this.propertyPhoneNumber = propertyPhoneNumber; - return this; - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("cargo_van") + CARGO_VAN("cargo_van"), - /** The room class for this purchase. */ - public Builder setRoomClass(String roomClass) { - this.roomClass = roomClass; - return this; - } + @SerializedName("compact") + COMPACT("compact"), - /** The number of room nights. */ - public Builder setRoomNights(Long roomNights) { - this.roomNights = roomNights; - return this; - } + @SerializedName("economy") + ECONOMY("economy"), - /** The total tax amount associating with the room reservation. */ - public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { - this.totalRoomTaxAmount = totalRoomTaxAmount; - return this; - } + @SerializedName("exotic") + EXOTIC("exotic"), - /** The total tax amount. */ - public Builder setTotalTaxAmount(Long totalTaxAmount) { - this.totalTaxAmount = totalTaxAmount; - return this; - } - } + @SerializedName("exotic_suv") + EXOTIC_SUV("exotic_suv"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + @SerializedName("fifteen_passenger_van") + FIFTEEN_PASSENGER_VAN("fifteen_passenger_van"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + @SerializedName("four_wheel_drive") + FOUR_WHEEL_DRIVE("four_wheel_drive"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("full_size") + FULL_SIZE("full_size"), - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; + @SerializedName("intermediate") + INTERMEDIATE("intermediate"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - String line2; + @SerializedName("large_suv") + LARGE_SUV("large_suv"), - /** ZIP or postal code. */ - @SerializedName("postal_code") - String postalCode; + @SerializedName("large_truck") + LARGE_TRUCK("large_truck"), - /** State, county, province, or region. */ - @SerializedName("state") - String state; + @SerializedName("luxury") + LUXURY("luxury"), - 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; - } + @SerializedName("medium_suv") + MEDIUM_SUV("medium_suv"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("midsize") + MIDSIZE("midsize"), - public static class Builder { - private String city; + @SerializedName("mini") + MINI("mini"), - private String country; + @SerializedName("minivan") + MINIVAN("minivan"), - private Map extraParams; + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), - private String line1; + @SerializedName("moped") + MOPED("moped"), - private String line2; + @SerializedName("moving_van") + MOVING_VAN("moving_van"), - private String postalCode; + @SerializedName("premium") + PREMIUM("premium"), - private String state; + @SerializedName("regular") + REGULAR("regular"), - /** 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); - } + @SerializedName("small_medium_truck") + SMALL_MEDIUM_TRUCK("small_medium_truck"), - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; - return this; - } + @SerializedName("small_suv") + SMALL_SUV("small_suv"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; - return this; - } + @SerializedName("special") + SPECIAL("special"), - /** - * Add a key/value pair to `extraParams` map. 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; - } + @SerializedName("standard") + STANDARD("standard"), - /** - * Add all map key/value pairs to `extraParams` map. 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; - } + @SerializedName("stretch") + STRETCH("stretch"), - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } + @SerializedName("subcompact") + SUBCOMPACT("subcompact"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } + @SerializedName("taxi") + TAXI("taxi"), - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + @SerializedName("twelve_foot_truck") + TWELVE_FOOT_TRUCK("twelve_foot_truck"), - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; + @SerializedName("twelve_passenger_van") + TWELVE_PASSENGER_VAN("twelve_passenger_van"), + + @SerializedName("twenty_foot_truck") + TWENTY_FOOT_TRUCK("twenty_foot_truck"), + + @SerializedName("twenty_four_foot_truck") + TWENTY_FOUR_FOOT_TRUCK("twenty_four_foot_truck"), + + @SerializedName("twenty_six_foot_truck") + TWENTY_SIX_FOOT_TRUCK("twenty_six_foot_truck"), + + @SerializedName("unique") + UNIQUE("unique"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public enum VehicleClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - private String name; + @SerializedName("economy") + ECONOMY("economy"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate build() { - return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate( - this.extraParams, this.name); - } + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** - * Add a key/value pair to `extraParams` map. 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; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * Add all map key/value pairs to `extraParams` map. 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; - return this; + VehicleClass(String value) { + this.value = value; } } } + } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EventDetails { + /** Indicates if the tickets are digitally checked when entering the venue. */ + @SerializedName("access_controlled_venue") + Boolean accessControlledVenue; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** The event location's address. */ + @SerializedName("address") + Address address; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { - this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; - } + /** The name of the company. */ + @SerializedName("company") + String company; - public static Builder builder() { - return new Builder(); - } + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - public static class Builder { - private Map extraParams; + /** Event end time. Measured in seconds since the Unix epoch. */ + @SerializedName("ends_at") + Long endsAt; - private Mode mode; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Recipient recipient; + /** Type of the event entertainment (concert, sports event etc). */ + @SerializedName("genre") + String genre; - /** 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); - } + /** Required. The name of the event. */ + @SerializedName("name") + String 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.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; - } + /** Event start time. Measured in seconds since the Unix epoch. */ + @SerializedName("starts_at") + Long startsAt; - /** - * Add all map key/value pairs to `extraParams` map. 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; - } + 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; + } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Mode mode) { - this.mode = mode; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { - this.recipient = recipient; - return this; - } - } + public static class Builder { + private Boolean accessControlledVenue; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + private Address address; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Affiliate affiliate; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + private String company; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + private Delivery delivery; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; - this.extraParams = extraParams; - this.name = name; - this.phone = phone; - } + private Long endsAt; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private String email; + private String genre; - private Map extraParams; + private String name; - private String name; + private Long startsAt; - 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); - } + /** 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); + } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; - return this; - } + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; + 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; - } + /** The event location's address. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address address) { + this.address = address; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. 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; - } + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; - return this; - } + /** The name of the company. */ + public Builder setCompany(String company) { + this.company = company; + return this; + } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } - } + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery delivery) { + this.delivery = delivery; + return this; } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + /** Event end time. Measured in seconds since the Unix epoch. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } - @SerializedName("phone") - PHONE("phone"), + /** + * Add a key/value pair to `extraParams` map. 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; + } - @SerializedName("pickup") - PICKUP("pickup"), + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - @SerializedName("post") - POST("post"); + /** Type of the event entertainment (concert, sports event etc). */ + public Builder setGenre(String genre) { + this.genre = genre; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Required. The name of the event. */ + public Builder setName(String name) { + this.name = name; + return this; + } - Mode(String value) { - this.value = value; - } + /** Event start time. Measured in seconds since the Unix epoch. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Passenger { + 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. @@ -6596,15 +7010,37 @@ public static class Passenger { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. Full name of the person or entity on the lodging reservation. - */ - @SerializedName("name") - String name; + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; - private Passenger(Map extraParams, String name) { + /** Address line 2, such as the 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.name = name; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } public static Builder builder() { @@ -6612,22 +7048,53 @@ public static Builder builder() { } public static class Builder { + private String city; + + private String country; + private Map extraParams; - private String name; + private String line1; + + private String line2; + + private String postalCode; + + private String state; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger build() { - return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger( - this.extraParams, this.name); + 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.Lodging.Passenger#extraParams} for the field - * documentation. + * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6641,8 +7108,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger#extraParams} for the field - * documentation. + * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6652,215 +7119,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Full name of the person or entity on the lodging - * reservation. - */ - public Builder setName(String name) { - this.name = name; + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; 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 - @EqualsAndHashCode(callSuper = false) - 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<>(); + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; } - 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; + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } } } @@ -6896,8 +7177,8 @@ public static class Builder { private String name; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate build() { - return new PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate( + public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate( this.extraParams, this.name); } @@ -6905,7 +7186,7 @@ public PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate build() * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate#extraParams} for the + * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6920,7 +7201,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate#extraParams} for the + * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -6941,14 +7222,7 @@ public Builder setName(String name) { @Getter @EqualsAndHashCode(callSuper = false) - 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; - + 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. @@ -6959,17 +7233,18 @@ public static class BillingInterval { @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; + /** The delivery method for the payment. */ + @SerializedName("mode") + Mode mode; - private BillingInterval(Long count, Map extraParams, Interval interval) { - this.count = count; + /** Details of the recipient. */ + @SerializedName("recipient") + Recipient recipient; + + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; - this.interval = interval; + this.mode = mode; + this.recipient = recipient; } public static Builder builder() { @@ -6977,33 +7252,24 @@ public static Builder builder() { } public static class Builder { - private Long count; - private Map extraParams; - private Interval interval; + private Mode mode; - /** 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); - } + private Recipient recipient; - /** - * 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; + /** 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.Subscription.BillingInterval#extraParams} for - * the field documentation. + * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -7017,8 +7283,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval#extraParams} for - * the field documentation. + * PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -7028,2338 +7294,2189 @@ public Builder putAllExtraParam(Map 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; + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Mode mode) { + this.mode = mode; return this; } - } - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } - @SerializedName("month") - MONTH("month"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @SerializedName("email") + String email; - @SerializedName("week") - WEEK("week"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("year") - YEAR("year"); + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + String name; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + String phone; - Interval(String value) { - this.value = value; + private Recipient( + String email, Map extraParams, String name, String phone) { + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; } - } - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static Builder builder() { + return new Builder(); + } - /** - * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm - * payment method. - */ - @SerializedName("affirm") - Affirm affirm; + public static class Builder { + private String email; - /** - * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the - * AfterpayClearpay payment method. - */ - @SerializedName("afterpay_clearpay") - AfterpayClearpay afterpayClearpay; + private Map extraParams; - /** - * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay - * payment method. - */ - @SerializedName("alipay") - Alipay alipay; + private String name; - /** - * 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; + private String phone; - /** - * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - */ - @SerializedName("alma") - Alma alma; + /** 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); + } - /** - * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment - * method. - */ - @SerializedName("amazon_pay") - AmazonPay amazonPay; + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } - /** - * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank - * account. - */ - @SerializedName("au_becs_debit") - AuBecsDebit auBecsDebit; + /** + * Add a key/value pair to `extraParams` map. 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; + } - /** - * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs - * Direct Debit bank account. - */ - @SerializedName("bacs_debit") - BacsDebit bacsDebit; + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - /** - * If this is a {@code bancontact} PaymentMethod, this hash contains details about the - * Bancontact payment method. - */ - @SerializedName("bancontact") - Bancontact bancontact; + /** The name of the recipient the ticket is delivered to. */ + public Builder setName(String name) { + this.name = name; + return this; + } - /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * payment method. - */ - @SerializedName("billie") - Billie billie; + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } - /** - * Billing information associated with the PaymentMethod that may be used or required by - * particular types of payment methods. - */ - @SerializedName("billing_details") - BillingDetails billingDetails; + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("email") + EMAIL("email"), - /** - * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment - * method. - */ - @SerializedName("blik") - Blik blik; + @SerializedName("phone") + PHONE("phone"), - /** - * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto - * payment method. - */ - @SerializedName("boleto") - Boleto boleto; + @SerializedName("pickup") + PICKUP("pickup"), - /** - * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay - * payment method. - */ - @SerializedName("cashapp") - Cashapp cashapp; + @SerializedName("post") + POST("post"); - /** - * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment - * method. - */ - @SerializedName("crypto") - Crypto crypto; + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the - * CustomerBalance payment method. - */ - @SerializedName("customer_balance") - CustomerBalance customerBalance; + Mode(String value) { + this.value = value; + } + } + } + } - /** - * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment - * method. - */ - @SerializedName("eps") - Eps eps; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flight { + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate 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; + /** + * 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; - /** - * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment - * method. - */ - @SerializedName("fpx") - Fpx fpx; + /** + * The International Air Transport Association (IATA) carrier code of the carrier that issued + * the ticket. + */ + @SerializedName("carrier") + String carrier; - /** - * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay - * payment method. - */ - @SerializedName("giropay") - Giropay giropay; + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - /** - * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - */ - @SerializedName("gopay") - Gopay gopay; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay - * payment method. - */ - @SerializedName("grabpay") - Grabpay grabpay; + /** The name of the person or entity on the reservation. */ + @SerializedName("passenger_name") + String passengerName; - /** - * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the - * IdBankTransfer payment method. - */ - @SerializedName("id_bank_transfer") - IdBankTransfer idBankTransfer; + /** The details of the passengers in the travel reservation. */ + @SerializedName("passengers") + List passengers; - /** - * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment - * method. - */ - @SerializedName("ideal") - Ideal ideal; + /** Required. The individual flight segments associated with the trip. */ + @SerializedName("segments") + List segments; - /** - * If this is an {@code interac_present} PaymentMethod, this hash contains details about the - * Interac Present payment method. - */ - @SerializedName("interac_present") - InteracPresent interacPresent; + /** The ticket number associated with the travel reservation. */ + @SerializedName("ticket_number") + String ticketNumber; - /** - * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao Pay - * payment method. - */ - @SerializedName("kakao_pay") - KakaoPay kakaoPay; + 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; + } - /** - * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna - * payment method. - */ - @SerializedName("klarna") - Klarna klarna; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini - * payment method. - */ - @SerializedName("konbini") - Konbini konbini; + public static class Builder { + private Affiliate affiliate; - /** - * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean Card - * payment method. - */ - @SerializedName("kr_card") - KrCard krCard; + private String agencyNumber; - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - @SerializedName("link") - Link link; + private String carrier; - /** - * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment - * method. - */ - @SerializedName("mb_way") - MbWay mbWay; + private Delivery delivery; - /** - * 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; + private Map extraParams; - /** - * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the MobilePay - * payment method. - */ - @SerializedName("mobilepay") - Mobilepay mobilepay; + private String passengerName; - /** - * If this is a {@code multibanco} PaymentMethod, this hash contains details about the - * Multibanco payment method. - */ - @SerializedName("multibanco") - Multibanco multibanco; + private List passengers; - /** - * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver Pay - * payment method. - */ - @SerializedName("naver_pay") - NaverPay naverPay; + private List segments; - /** - * If this is an nz_bank_account PaymentMethod, this hash contains details about the - * nz_bank_account payment method. - */ - @SerializedName("nz_bank_account") - NzBankAccount nzBankAccount; + private String ticketNumber; - /** - * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment - * method. - */ - @SerializedName("oxxo") - Oxxo oxxo; + /** 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); + } - /** - * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment - * method. - */ - @SerializedName("p24") - P24 p24; + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. - */ - @SerializedName("pay_by_bank") - PayByBank payByBank; + /** + * 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; + } - /** - * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment - * method. - */ - @SerializedName("payco") - Payco payco; - - /** - * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow - * payment method. - */ - @SerializedName("paynow") - Paynow paynow; + /** + * 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; + } - /** - * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal - * payment method. - */ - @SerializedName("paypal") - Paypal paypal; + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery delivery) { + this.delivery = delivery; + return this; + } - /** - * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay - * payment method. - */ - @SerializedName("paypay") - Paypay paypay; + /** + * Add a key/value pair to `extraParams` map. 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; + } - /** - * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment - * method. - */ - @SerializedName("payto") - Payto payto; + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - /** - * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment - * method. - */ - @SerializedName("pix") - Pix pix; + /** The name of the person or entity on the reservation. */ + public Builder setPassengerName(String passengerName) { + this.passengerName = passengerName; + return this; + } - /** - * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay - * payment method. - */ - @SerializedName("promptpay") - Promptpay promptpay; + /** + * 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; + } - /** - * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment - * method. - */ - @SerializedName("qris") - Qris qris; + /** + * 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; + } - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - @SerializedName("radar_options") - RadarOptions radarOptions; + /** + * 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; + } - /** - * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung - * payment method. - */ - @SerializedName("rechnung") - Rechnung rechnung; + /** + * 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; + } - /** - * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the Revolut - * Pay payment method. - */ - @SerializedName("revolut_pay") - RevolutPay revolutPay; + /** The ticket number associated with the travel reservation. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + } - /** - * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the - * SamsungPay payment method. - */ - @SerializedName("samsung_pay") - SamsungPay samsungPay; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay - * payment method. - */ - @SerializedName("satispay") - Satispay satispay; + /** Required. The name of the affiliate that originated the purchase. */ + @SerializedName("name") + String name; - /** - * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA - * debit bank account. - */ - @SerializedName("sepa_debit") - SepaDebit sepaDebit; + private Affiliate(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - /** - * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment - * method. - */ - @SerializedName("shopeepay") - Shopeepay shopeepay; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT - * payment method. - */ - @SerializedName("sofort") - Sofort sofort; + public static class Builder { + private Map extraParams; - /** This hash contains details about the Stripe balance payment method. */ - @SerializedName("stripe_balance") - StripeBalance stripeBalance; + private String name; - /** - * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment - * method. - */ - @SerializedName("swish") - Swish swish; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate( + this.extraParams, this.name); + } - /** - * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - */ - @SerializedName("twint") - Twint twint; + /** + * Add a key/value pair to `extraParams` map. 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; + } - /** - * 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; + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - /** - * 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; + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } - /** - * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the - * wechat_pay payment method. - */ - @SerializedName("wechat_pay") - WechatPay wechatPay; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment - * method. - */ - @SerializedName("zip") - Zip zip; + /** The delivery method for the payment. */ + @SerializedName("mode") + Mode mode; - private PaymentMethodData( - AcssDebit acssDebit, - Affirm affirm, - AfterpayClearpay afterpayClearpay, - Alipay alipay, - AllowRedisplay allowRedisplay, - Alma alma, - AmazonPay amazonPay, - AuBecsDebit auBecsDebit, - BacsDebit bacsDebit, - Bancontact bancontact, - Billie billie, - BillingDetails billingDetails, - Blik blik, - Boleto boleto, - Cashapp cashapp, - Crypto crypto, - CustomerBalance customerBalance, - Eps eps, - Map extraParams, - Fpx fpx, - Giropay giropay, - Gopay gopay, - Grabpay grabpay, - IdBankTransfer idBankTransfer, - Ideal ideal, - InteracPresent interacPresent, - KakaoPay kakaoPay, - Klarna klarna, - Konbini konbini, - KrCard krCard, - Link link, - MbWay mbWay, - Map metadata, - Mobilepay mobilepay, - Multibanco multibanco, - NaverPay naverPay, - NzBankAccount nzBankAccount, - Oxxo oxxo, - P24 p24, - PayByBank payByBank, - Payco payco, - Paynow paynow, - Paypal paypal, - Paypay paypay, - Payto payto, - Pix pix, - Promptpay promptpay, - Qris qris, - RadarOptions radarOptions, - Rechnung rechnung, - RevolutPay revolutPay, - SamsungPay samsungPay, - Satispay satispay, - SepaDebit sepaDebit, - Shopeepay shopeepay, - Sofort sofort, - StripeBalance stripeBalance, - 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.alma = alma; - this.amazonPay = amazonPay; - this.auBecsDebit = auBecsDebit; - this.bacsDebit = bacsDebit; - this.bancontact = bancontact; - this.billie = billie; - this.billingDetails = billingDetails; - this.blik = blik; - this.boleto = boleto; - this.cashapp = cashapp; - this.crypto = crypto; - this.customerBalance = customerBalance; - this.eps = eps; - this.extraParams = extraParams; - this.fpx = fpx; - this.giropay = giropay; - this.gopay = gopay; - this.grabpay = grabpay; - this.idBankTransfer = idBankTransfer; - this.ideal = ideal; - this.interacPresent = interacPresent; - this.kakaoPay = kakaoPay; - this.klarna = klarna; - this.konbini = konbini; - this.krCard = krCard; - this.link = link; - this.mbWay = mbWay; - this.metadata = metadata; - this.mobilepay = mobilepay; - this.multibanco = multibanco; - this.naverPay = naverPay; - this.nzBankAccount = nzBankAccount; - this.oxxo = oxxo; - this.p24 = p24; - this.payByBank = payByBank; - this.payco = payco; - this.paynow = paynow; - this.paypal = paypal; - this.paypay = paypay; - this.payto = payto; - this.pix = pix; - this.promptpay = promptpay; - this.qris = qris; - this.radarOptions = radarOptions; - this.rechnung = rechnung; - this.revolutPay = revolutPay; - this.samsungPay = samsungPay; - this.satispay = satispay; - this.sepaDebit = sepaDebit; - this.shopeepay = shopeepay; - this.sofort = sofort; - this.stripeBalance = stripeBalance; - this.swish = swish; - this.twint = twint; - this.type = type; - this.usBankAccount = usBankAccount; - this.wechatPay = wechatPay; - this.zip = zip; - } + /** Details of the recipient. */ + @SerializedName("recipient") + Recipient recipient; - public static Builder builder() { - return new Builder(); - } + private Delivery(Map extraParams, Mode mode, Recipient recipient) { + this.extraParams = extraParams; + this.mode = mode; + this.recipient = recipient; + } - public static class Builder { - private AcssDebit acssDebit; + public static Builder builder() { + return new Builder(); + } - private Affirm affirm; + public static class Builder { + private Map extraParams; - private AfterpayClearpay afterpayClearpay; + private Mode mode; - private Alipay alipay; + private Recipient recipient; - private AllowRedisplay allowRedisplay; + /** 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); + } - private Alma alma; + /** + * Add a key/value pair to `extraParams` map. 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; + } - private AmazonPay amazonPay; + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - private AuBecsDebit auBecsDebit; + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Mode mode) { + this.mode = mode; + return this; + } - private BacsDebit bacsDebit; + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } - private Bancontact bancontact; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @SerializedName("email") + String email; - private Billie billie; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 BillingDetails billingDetails; + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + String name; - private Blik blik; + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + String phone; - private Boleto boleto; + private Recipient( + String email, Map extraParams, String name, String phone) { + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } - private Cashapp cashapp; + public static Builder builder() { + return new Builder(); + } - private Crypto crypto; + public static class Builder { + private String email; - private CustomerBalance customerBalance; + private Map extraParams; - private Eps eps; + private String name; - private Map extraParams; + private String phone; - private Fpx fpx; + /** 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); + } - private Giropay giropay; + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } - private Gopay gopay; + /** + * Add a key/value pair to `extraParams` map. 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; + } - private Grabpay grabpay; + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - private IdBankTransfer idBankTransfer; + /** The name of the recipient the ticket is delivered to. */ + public Builder setName(String name) { + this.name = name; + return this; + } - private Ideal ideal; + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } - private InteracPresent interacPresent; + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("email") + EMAIL("email"), - private KakaoPay kakaoPay; + @SerializedName("phone") + PHONE("phone"), - private Klarna klarna; + @SerializedName("pickup") + PICKUP("pickup"), - private Konbini konbini; + @SerializedName("post") + POST("post"); - private KrCard krCard; + @Getter(onMethod_ = {@Override}) + private final String value; - private Link link; + Mode(String value) { + this.value = value; + } + } + } - private MbWay mbWay; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - private Map metadata; + /** + * Required. Full name of the person or entity on the flight reservation. + */ + @SerializedName("name") + String name; - private Mobilepay mobilepay; + private Passenger(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - private Multibanco multibanco; + public static Builder builder() { + return new Builder(); + } - private NaverPay naverPay; + public static class Builder { + private Map extraParams; - private NzBankAccount nzBankAccount; + private String name; - private Oxxo oxxo; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger build() { + return new PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger( + this.extraParams, this.name); + } - private P24 p24; + /** + * Add a key/value pair to `extraParams` map. 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; + } - private PayByBank payByBank; + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - private Payco payco; + /** + * Required. Full name of the person or entity on the flight reservation. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } - private Paynow paynow; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Segment { + /** The flight segment amount. */ + @SerializedName("amount") + Long amount; - private Paypal paypal; + /** + * The International Air Transport Association (IATA) airport code for the arrival airport. + */ + @SerializedName("arrival_airport") + String arrivalAirport; - private Paypay paypay; + /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ + @SerializedName("arrives_at") + Long arrivesAt; - private Payto payto; + /** + * The International Air Transport Association (IATA) carrier code of the carrier operating + * the flight segment. + */ + @SerializedName("carrier") + String carrier; - private Pix pix; + /** + * Required. The departure time for the flight segment. Measured in seconds + * since the Unix epoch. + */ + @SerializedName("departs_at") + Long departsAt; - private Promptpay promptpay; + /** + * The International Air Transport Association (IATA) airport code for the departure + * airport. + */ + @SerializedName("departure_airport") + String departureAirport; - private Qris qris; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 RadarOptions radarOptions; + /** The flight number associated with the segment. */ + @SerializedName("flight_number") + String flightNumber; - private Rechnung rechnung; + /** The fare class for the segment. */ + @SerializedName("service_class") + ServiceClass serviceClass; - private RevolutPay revolutPay; - - private SamsungPay samsungPay; + 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; + } - private Satispay satispay; + public static Builder builder() { + return new Builder(); + } - private SepaDebit sepaDebit; + public static class Builder { + private Long amount; - private Shopeepay shopeepay; + private String arrivalAirport; - private Sofort sofort; + private Long arrivesAt; - private StripeBalance stripeBalance; + private String carrier; - private Swish swish; + private Long departsAt; - private Twint twint; + private String departureAirport; - private Type type; + private Map extraParams; - private UsBankAccount usBankAccount; + private String flightNumber; - private WechatPay wechatPay; + private ServiceClass serviceClass; - private Zip zip; + /** 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); + } - /** 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.alma, - this.amazonPay, - this.auBecsDebit, - this.bacsDebit, - this.bancontact, - this.billie, - this.billingDetails, - this.blik, - this.boleto, - this.cashapp, - this.crypto, - this.customerBalance, - this.eps, - this.extraParams, - this.fpx, - this.giropay, - this.gopay, - this.grabpay, - this.idBankTransfer, - this.ideal, - this.interacPresent, - this.kakaoPay, - this.klarna, - this.konbini, - this.krCard, - this.link, - this.mbWay, - this.metadata, - this.mobilepay, - this.multibanco, - this.naverPay, - this.nzBankAccount, - this.oxxo, - this.p24, - this.payByBank, - this.payco, - this.paynow, - this.paypal, - this.paypay, - this.payto, - this.pix, - this.promptpay, - this.qris, - this.radarOptions, - this.rechnung, - this.revolutPay, - this.samsungPay, - this.satispay, - this.sepaDebit, - this.shopeepay, - this.sofort, - this.stripeBalance, - this.swish, - this.twint, - this.type, - this.usBankAccount, - this.wechatPay, - this.zip); - } + /** The flight segment amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** - * 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; - } + /** + * The International Air Transport Association (IATA) airport code for the arrival + * airport. + */ + public Builder setArrivalAirport(String arrivalAirport) { + this.arrivalAirport = arrivalAirport; + 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; - } + /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ + public Builder setArrivesAt(Long arrivesAt) { + this.arrivesAt = arrivesAt; + 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; - } + /** + * 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; + } - /** - * 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; - } + /** + * 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; + } - /** - * 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; - } + /** + * The International Air Transport Association (IATA) airport code for the departure + * airport. + */ + public Builder setDepartureAirport(String departureAirport) { + this.departureAirport = departureAirport; + return this; + } - /** - * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - */ - public Builder setAlma(PaymentIntentConfirmParams.PaymentMethodData.Alma alma) { - this.alma = alma; - 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; + } - /** - * 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; - } + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - /** - * 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; - } + /** The flight number associated with the segment. */ + public Builder setFlightNumber(String flightNumber) { + this.flightNumber = flightNumber; + 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; - } + /** The fare class for the segment. */ + public Builder setServiceClass( + PaymentIntentConfirmParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { + this.serviceClass = serviceClass; + 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; - } + public enum ServiceClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * payment method. - */ - public Builder setBillie(PaymentIntentConfirmParams.PaymentMethodData.Billie billie) { - this.billie = billie; - return this; - } + @SerializedName("economy") + ECONOMY("economy"), - /** - * 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; - } + @SerializedName("first") + FIRST("first"), - /** - * 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; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * 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; + ServiceClass(String value) { + this.value = value; + } + } } + } - /** - * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment - * method. - */ - public Builder setCrypto(PaymentIntentConfirmParams.PaymentMethodData.Crypto crypto) { - this.crypto = crypto; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FlightData { + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; - /** - * 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; - } + /** Reservation reference. */ + @SerializedName("booking_number") + String bookingNumber; - /** - * 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; - } + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + @SerializedName("computerized_reservation_system") + String computerizedReservationSystem; - /** - * Add a key/value pair to `extraParams` map. 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; - } + /** Ticket restrictions. */ + @SerializedName("endorsements_and_restrictions") + String endorsementsAndRestrictions; /** - * Add all map key/value pairs to `extraParams` map. 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. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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; - } + /** List of insurances. */ + @SerializedName("insurances") + List insurances; - /** - * 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; - } + /** List of passengers. */ + @SerializedName("passengers") + List passengers; - /** - * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment - * method. - */ - public Builder setGopay(PaymentIntentConfirmParams.PaymentMethodData.Gopay gopay) { - this.gopay = gopay; - return this; - } + /** Required. List of flight segments. */ + @SerializedName("segments") + List segments; - /** - * 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; - } + /** Electronic ticket indicator. */ + @SerializedName("ticket_electronically_issued_indicator") + Boolean ticketElectronicallyIssuedIndicator; - /** - * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the - * IdBankTransfer payment method. - */ - public Builder setIdBankTransfer( - PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer idBankTransfer) { - this.idBankTransfer = idBankTransfer; - return this; - } + /** Required. Total cost breakdown. */ + @SerializedName("total") + Total total; - /** - * 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; - } + /** Type of flight transaction. */ + @SerializedName("transaction_type") + TransactionType transactionType; - /** - * 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; + private FlightData( + Affiliate affiliate, + String bookingNumber, + String computerizedReservationSystem, + String endorsementsAndRestrictions, + Map extraParams, + List insurances, + List passengers, + List segments, + Boolean ticketElectronicallyIssuedIndicator, + Total total, + TransactionType transactionType) { + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.computerizedReservationSystem = computerizedReservationSystem; + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.segments = segments; + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + this.total = total; + this.transactionType = transactionType; } - /** - * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao - * Pay payment method. - */ - public Builder setKakaoPay(PaymentIntentConfirmParams.PaymentMethodData.KakaoPay kakaoPay) { - this.kakaoPay = kakaoPay; - return this; + public static Builder builder() { + return new Builder(); } - /** - * 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; - } + public static class Builder { + private Affiliate affiliate; - /** - * 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; - } + private String bookingNumber; - /** - * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean - * Card payment method. - */ - public Builder setKrCard(PaymentIntentConfirmParams.PaymentMethodData.KrCard krCard) { - this.krCard = krCard; - return this; - } + private String computerizedReservationSystem; - /** - * 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; - } + private String endorsementsAndRestrictions; - /** - * 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; - } + private Map extraParams; - /** - * 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; - } + private List insurances; - /** - * 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; - } + private List passengers; - /** - * 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; - } + private List segments; - /** - * 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; - } + private Boolean ticketElectronicallyIssuedIndicator; - /** - * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver - * Pay payment method. - */ - public Builder setNaverPay(PaymentIntentConfirmParams.PaymentMethodData.NaverPay naverPay) { - this.naverPay = naverPay; - return this; - } + private Total total; - /** - * If this is an nz_bank_account PaymentMethod, this hash contains details about the - * nz_bank_account payment method. - */ - public Builder setNzBankAccount( - PaymentIntentConfirmParams.PaymentMethodData.NzBankAccount nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; - } + private TransactionType transactionType; - /** - * 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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData( + this.affiliate, + this.bookingNumber, + this.computerizedReservationSystem, + this.endorsementsAndRestrictions, + this.extraParams, + this.insurances, + this.passengers, + this.segments, + this.ticketElectronicallyIssuedIndicator, + this.total, + this.transactionType); + } - /** - * 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; - } + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. - */ - public Builder setPayByBank( - PaymentIntentConfirmParams.PaymentMethodData.PayByBank payByBank) { - this.payByBank = payByBank; - return this; - } + /** Reservation reference. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } - /** - * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO - * payment method. - */ - public Builder setPayco(PaymentIntentConfirmParams.PaymentMethodData.Payco payco) { - this.payco = payco; - return this; - } + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + public Builder setComputerizedReservationSystem(String computerizedReservationSystem) { + this.computerizedReservationSystem = computerizedReservationSystem; + 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; - } + /** Ticket restrictions. */ + public Builder setEndorsementsAndRestrictions(String endorsementsAndRestrictions) { + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + 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; - } + /** + * Add a key/value pair to `extraParams` map. 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.FlightData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay - * payment method. - */ - public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodData.Paypay paypay) { - this.paypay = paypay; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. 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.FlightData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo - * payment method. - */ - public Builder setPayto(PaymentIntentConfirmParams.PaymentMethodData.Payto payto) { - this.payto = payto; - return this; - } + /** + * Add an element to `insurances` 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.FlightData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + 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; - } + /** + * Add all elements to `insurances` 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.FlightData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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; - } + /** + * 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.FlightData#passengers} for the field + * documentation. + */ + public Builder addPassenger( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Passenger element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - /** - * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment - * method. - */ - public Builder setQris(PaymentIntentConfirmParams.PaymentMethodData.Qris qris) { - this.qris = qris; - 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.FlightData#passengers} for the field + * documentation. + */ + public Builder addAllPassenger( + List elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - public Builder setRadarOptions( - PaymentIntentConfirmParams.PaymentMethodData.RadarOptions radarOptions) { - this.radarOptions = radarOptions; - 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.FlightData#segments} for the field + * documentation. + */ + public Builder addSegment( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment element) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.add(element); + 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; - } + /** + * 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.FlightData#segments} for the field + * documentation. + */ + public Builder addAllSegment( + List elements) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.addAll(elements); + 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; - } + /** Electronic ticket indicator. */ + public Builder setTicketElectronicallyIssuedIndicator( + Boolean ticketElectronicallyIssuedIndicator) { + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + return this; + } - /** - * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the - * SamsungPay payment method. - */ - public Builder setSamsungPay( - PaymentIntentConfirmParams.PaymentMethodData.SamsungPay samsungPay) { - this.samsungPay = samsungPay; - return this; - } + /** Required. Total cost breakdown. */ + public Builder setTotal(PaymentIntentConfirmParams.PaymentDetails.FlightData.Total total) { + this.total = total; + return this; + } - /** - * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay - * payment method. - */ - public Builder setSatispay(PaymentIntentConfirmParams.PaymentMethodData.Satispay satispay) { - this.satispay = satispay; - return this; + /** Type of flight transaction. */ + public Builder setTransactionType( + PaymentIntentConfirmParams.PaymentDetails.FlightData.TransactionType transactionType) { + this.transactionType = transactionType; + 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; - /** - * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay - * payment method. - */ - public Builder setShopeepay( - PaymentIntentConfirmParams.PaymentMethodData.Shopeepay shopeepay) { - this.shopeepay = shopeepay; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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; - } + /** Name of affiliate partner. */ + @SerializedName("name") + String name; - /** This hash contains details about the Stripe balance payment method. */ - public Builder setStripeBalance( - PaymentIntentConfirmParams.PaymentMethodData.StripeBalance stripeBalance) { - this.stripeBalance = stripeBalance; - return this; - } + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + @SerializedName("travel_authorization_code") + String travelAuthorizationCode; - /** - * 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; - } + private Affiliate( + String code, + Map extraParams, + String name, + String travelAuthorizationCode) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + this.travelAuthorizationCode = travelAuthorizationCode; + } - /** - * 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * 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; - } + public static class Builder { + private String code; - /** - * 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; - } + private Map extraParams; - /** - * 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; - } + private String name; - /** - * 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; - } - } + private String travelAuthorizationCode; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class AcssDebit { - /** Required. Customer's bank account number. */ - @SerializedName("account_number") - String accountNumber; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Affiliate( + this.code, this.extraParams, this.name, this.travelAuthorizationCode); + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + return this; + } - /** Required. Institution number of the customer's bank. */ - @SerializedName("institution_number") - String institutionNumber; + /** + * Add a key/value pair to `extraParams` map. 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.FlightData.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; + } - /** Required. Transit number of the customer's bank. */ - @SerializedName("transit_number") - String transitNumber; + /** + * Add all map key/value pairs to `extraParams` map. 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.FlightData.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; + } - private AcssDebit( - String accountNumber, - Map extraParams, - String institutionNumber, - String transitNumber) { - this.accountNumber = accountNumber; - this.extraParams = extraParams; - this.institutionNumber = institutionNumber; - this.transitNumber = transitNumber; - } + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; + return this; + } - public static Builder builder() { - return new Builder(); + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + public Builder setTravelAuthorizationCode(String travelAuthorizationCode) { + this.travelAuthorizationCode = travelAuthorizationCode; + return this; + } + } } - public static class Builder { - private String accountNumber; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Insurance cost. */ + @SerializedName("amount") + Long amount; - private Map extraParams; + /** Insurance currency. */ + @SerializedName("currency") + String currency; - private String institutionNumber; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 String transitNumber; + /** Insurance company name. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - /** 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. Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - /** Required. Customer's bank account number. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } - /** - * Add a key/value pair to `extraParams` map. 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; + public static Builder builder() { + return new Builder(); } - /** - * Add all map key/value pairs to `extraParams` map. 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; - } + public static class Builder { + private Long amount; - /** Required. Institution number of the customer's bank. */ - public Builder setInstitutionNumber(String institutionNumber) { - this.institutionNumber = institutionNumber; - return this; - } + private String currency; - /** Required. Transit number of the customer's bank. */ - public Builder setTransitNumber(String transitNumber) { - this.transitNumber = transitNumber; - return this; - } - } - } + private Map extraParams; - @Getter - @EqualsAndHashCode(callSuper = false) - 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 String insuranceCompanyName; - private Affirm(Map extraParams) { - this.extraParams = extraParams; - } + private InsuranceType insuranceType; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Insurance build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } - public static class Builder { - private Map extraParams; + /** Required. Insurance cost. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Affirm build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Affirm(this.extraParams); - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Affirm#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. 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.FlightData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + /** + * Add all map key/value pairs to `extraParams` map. 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.FlightData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Insurance company name. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - private AfterpayClearpay(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - public static class Builder { - private Map extraParams; + @SerializedName("emergency") + EMERGENCY("emergency"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay( - this.extraParams); - } + @SerializedName("medical") + MEDICAL("medical"); - /** - * Add a key/value pair to `extraParams` map. 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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + InsuranceType(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - public static Builder builder() { - return new Builder(); - } + /** Required. Passenger's full name. */ + @SerializedName("name") + String name; - public static class Builder { - private Map extraParams; + private Passenger(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Alipay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Alipay(this.extraParams); + public static Builder builder() { + return new Builder(); } - /** - * Add a key/value pair to `extraParams` map. 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<>(); + public static class Builder { + private Map extraParams; + + private String name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Passenger build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Passenger( + this.extraParams, this.name); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + /** + * Add a key/value pair to `extraParams` map. 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.FlightData.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.FlightData.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. Passenger's full name. */ + public Builder setName(String name) { + this.name = name; + return this; } - this.extraParams.putAll(map); - return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Alma { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Segment { + /** Segment fare amount. */ + @SerializedName("amount") + Long amount; - private Alma(Map extraParams) { - this.extraParams = extraParams; - } + /** Required. Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - public static Builder builder() { - return new Builder(); - } + /** Required. Airline carrier code. */ + @SerializedName("carrier_code") + String carrierCode; - public static class Builder { - private Map extraParams; + /** Carrier name. */ + @SerializedName("carrier_name") + String carrierName; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Alma build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Alma(this.extraParams); - } + /** Segment currency. */ + @SerializedName("currency") + String currency; - /** - * Add a key/value pair to `extraParams` map. 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.Alma#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Required. Departure details. */ + @SerializedName("departure") + Departure departure; + + /** Exchange ticket number. */ + @SerializedName("exchange_ticket_number") + String exchangeTicketNumber; /** - * Add all map key/value pairs to `extraParams` map. 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.Alma#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** Fare basis code. */ + @SerializedName("fare_basis_code") + String fareBasisCode; - private AmazonPay(Map extraParams) { - this.extraParams = extraParams; - } + /** Additional fees. */ + @SerializedName("fees") + Long fees; - public static Builder builder() { - return new Builder(); - } + /** Flight number. */ + @SerializedName("flight_number") + String flightNumber; - public static class Builder { - private Map extraParams; + /** Stopover indicator. */ + @SerializedName("is_stop_over_indicator") + Boolean isStopOverIndicator; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.AmazonPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.AmazonPay(this.extraParams); - } + /** Refundable ticket indicator. */ + @SerializedName("refundable") + Boolean refundable; - /** - * Add a key/value pair to `extraParams` map. 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; + /** Required. Class of service. */ + @SerializedName("service_class") + ServiceClass serviceClass; + + /** Tax amount for segment. */ + @SerializedName("tax_amount") + Long taxAmount; + + /** Ticket number. */ + @SerializedName("ticket_number") + String ticketNumber; + + private Segment( + Long amount, + Arrival arrival, + String carrierCode, + String carrierName, + String currency, + Departure departure, + String exchangeTicketNumber, + Map extraParams, + String fareBasisCode, + Long fees, + String flightNumber, + Boolean isStopOverIndicator, + Boolean refundable, + ServiceClass serviceClass, + Long taxAmount, + String ticketNumber) { + this.amount = amount; + this.arrival = arrival; + this.carrierCode = carrierCode; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.exchangeTicketNumber = exchangeTicketNumber; + this.extraParams = extraParams; + this.fareBasisCode = fareBasisCode; + this.fees = fees; + this.flightNumber = flightNumber; + this.isStopOverIndicator = isStopOverIndicator; + this.refundable = refundable; + this.serviceClass = serviceClass; + this.taxAmount = taxAmount; + this.ticketNumber = ticketNumber; } - /** - * Add all map key/value pairs to `extraParams` map. 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; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class AuBecsDebit { - /** Required. The account number for the bank account. */ - @SerializedName("account_number") - String accountNumber; + public static class Builder { + private Long amount; - /** Required. Bank-State-Branch number of the bank account. */ - @SerializedName("bsb_number") - String bsbNumber; + private Arrival arrival; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 String carrierCode; - private AuBecsDebit(String accountNumber, String bsbNumber, Map extraParams) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; - this.extraParams = extraParams; - } + private String carrierName; - public static Builder builder() { - return new Builder(); - } + private String currency; - public static class Builder { - private String accountNumber; + private Departure departure; - private String bsbNumber; + private String exchangeTicketNumber; - private Map extraParams; + 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); - } + private String fareBasisCode; - /** Required. The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + private Long fees; - /** Required. Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - return this; - } + private String flightNumber; - /** - * Add a key/value pair to `extraParams` map. 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; - } + private Boolean isStopOverIndicator; - /** - * Add all map key/value pairs to `extraParams` map. 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; - } - } - } + private Boolean refundable; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BacsDebit { - /** Account number of the bank account that the funds will be debited from. */ - @SerializedName("account_number") - String accountNumber; + private ServiceClass serviceClass; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Long taxAmount; - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - @SerializedName("sort_code") - String sortCode; + private String ticketNumber; - private BacsDebit(String accountNumber, Map extraParams, String sortCode) { - this.accountNumber = accountNumber; - this.extraParams = extraParams; - this.sortCode = sortCode; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment( + this.amount, + this.arrival, + this.carrierCode, + this.carrierName, + this.currency, + this.departure, + this.exchangeTicketNumber, + this.extraParams, + this.fareBasisCode, + this.fees, + this.flightNumber, + this.isStopOverIndicator, + this.refundable, + this.serviceClass, + this.taxAmount, + this.ticketNumber); + } - public static Builder builder() { - return new Builder(); - } + /** Segment fare amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - public static class Builder { - private String accountNumber; + /** Required. Arrival details. */ + public Builder setArrival( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment.Arrival arrival) { + this.arrival = arrival; + return this; + } - private Map extraParams; + /** Required. Airline carrier code. */ + public Builder setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } - private String sortCode; + /** Carrier name. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.BacsDebit build() { - return new PaymentIntentConfirmParams.PaymentMethodData.BacsDebit( - this.accountNumber, this.extraParams, this.sortCode); - } + /** Segment currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** Account number of the bank account that the funds will be debited from. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** Required. Departure details. */ + public Builder setDeparture( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment.Departure departure) { + this.departure = departure; + 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<>(); + /** Exchange ticket number. */ + public Builder setExchangeTicketNumber(String exchangeTicketNumber) { + this.exchangeTicketNumber = exchangeTicketNumber; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + /** + * Add a key/value pair to `extraParams` map. 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.FlightData.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; } - 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; - } - } - } + /** + * Add all map key/value pairs to `extraParams` map. 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.FlightData.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; + } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** Fare basis code. */ + public Builder setFareBasisCode(String fareBasisCode) { + this.fareBasisCode = fareBasisCode; + return this; + } - private Bancontact(Map extraParams) { - this.extraParams = extraParams; - } + /** Additional fees. */ + public Builder setFees(Long fees) { + this.fees = fees; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Flight number. */ + public Builder setFlightNumber(String flightNumber) { + this.flightNumber = flightNumber; + return this; + } - public static class Builder { - private Map extraParams; + /** Stopover indicator. */ + public Builder setIsStopOverIndicator(Boolean isStopOverIndicator) { + this.isStopOverIndicator = isStopOverIndicator; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Bancontact build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Bancontact(this.extraParams); - } + /** Refundable ticket indicator. */ + public Builder setRefundable(Boolean refundable) { + this.refundable = refundable; + 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.Bancontact#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. Class of service. */ + public Builder setServiceClass( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment.ServiceClass + serviceClass) { + this.serviceClass = serviceClass; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + /** Tax amount for segment. */ + public Builder setTaxAmount(Long taxAmount) { + this.taxAmount = taxAmount; + return this; + } + + /** Ticket number. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Billie { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Required. Arrival airport IATA code. */ + @SerializedName("airport") + String airport; - private Billie(Map extraParams) { - this.extraParams = extraParams; - } + /** Arrival date/time. */ + @SerializedName("arrives_at") + Long arrivesAt; - public static Builder builder() { - return new Builder(); - } + /** Arrival city. */ + @SerializedName("city") + String city; - public static class Builder { - private Map extraParams; + /** Arrival country. */ + @SerializedName("country") + String country; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Billie build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Billie(this.extraParams); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map 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.Billie#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Arrival( + String airport, + Long arrivesAt, + String city, + String country, + Map extraParams) { + this.airport = airport; + this.arrivesAt = arrivesAt; + this.city = city; + this.country = country; + this.extraParams = extraParams; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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.Billie#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static class Builder { + private String airport; - /** Billing phone number (including extension). */ - @SerializedName("phone") - Object phone; + private Long arrivesAt; - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - @SerializedName("tax_id") - String taxId; + private String city; - private BillingDetails( - Object address, - Object email, - Map extraParams, - Object name, - Object phone, - String taxId) { - this.address = address; - this.email = email; - this.extraParams = extraParams; - this.name = name; - this.phone = phone; - this.taxId = taxId; - } + private String country; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Object address; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment.Arrival build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment.Arrival( + this.airport, this.arrivesAt, this.city, this.country, this.extraParams); + } - private Object email; + /** Required. Arrival airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } - private Map extraParams; + /** Arrival date/time. */ + public Builder setArrivesAt(Long arrivesAt) { + this.arrivesAt = arrivesAt; + return this; + } - private Object name; + /** Arrival city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private Object phone; + /** Arrival country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private String 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.PaymentDetails.FlightData.Segment.Arrival#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** 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, this.taxId); + /** + * Add all map key/value pairs to `extraParams` map. 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.FlightData.Segment.Arrival#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } } - /** Billing address. */ - public Builder setAddress( - PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address address) { - this.address = address; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Required. Departure airport IATA code. */ + @SerializedName("airport") + String airport; - /** Billing address. */ - public Builder setAddress(EmptyParam address) { - this.address = address; - return this; - } + /** Departure city. */ + @SerializedName("city") + String city; - /** Email address. */ - public Builder setEmail(String email) { - this.email = email; - return this; - } + /** Departure country. */ + @SerializedName("country") + String country; - /** Email address. */ - public Builder setEmail(EmptyParam email) { - this.email = email; - return this; - } + /** Required. Departure date/time. */ + @SerializedName("departs_at") + Long departsAt; - /** - * Add a key/value pair to `extraParams` map. 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<>(); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Departure( + String airport, + String city, + String country, + Long departsAt, + Map extraParams) { + this.airport = airport; + this.city = city; + this.country = country; + this.departsAt = departsAt; + this.extraParams = extraParams; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - /** Full name. */ - public Builder setName(String name) { - this.name = name; - return this; - } + public static class Builder { + private String airport; - /** Full name. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + private String city; - /** Billing phone number (including extension). */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } + private String country; - /** Billing phone number (including extension). */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; - } + private Long departsAt; - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - public Builder setTaxId(String taxId) { - this.taxId = taxId; - return this; - } - } + private Map extraParams; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment.Departure build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Segment.Departure( + this.airport, this.city, this.country, this.departsAt, this.extraParams); + } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + /** Required. Departure airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Departure city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; + /** Departure country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - String line2; + /** Required. Departure date/time. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - /** ZIP or postal code. */ - @SerializedName("postal_code") - String postalCode; + /** + * Add a key/value pair to `extraParams` map. 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.FlightData.Segment.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** State, county, province, or region. */ - @SerializedName("state") - String state; + /** + * Add all map key/value pairs to `extraParams` map. 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.FlightData.Segment.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - private Address( - String city, - String country, + public enum ServiceClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Total { + /** Required. Total flight amount. */ + @SerializedName("amount") + Long amount; + + /** Reason for credit. */ + @SerializedName("credit_reason") + CreditReason creditReason; + + /** Total currency. */ + @SerializedName("currency") + String currency; + + /** Discount details. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges. */ + @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; + + /** Tax breakdown. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + CreditReason creditReason, + String currency, + Discounts discounts, + List + extraCharges, Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + Tax tax) { + this.amount = amount; + this.creditReason = creditReason; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.tax = tax; } public static Builder builder() { @@ -9367,53 +9484,96 @@ public static Builder builder() { } public static class Builder { - private String city; + private Long amount; - private String country; + private CreditReason creditReason; - private Map extraParams; + private String currency; - private String line1; + private Discounts discounts; - private String line2; + private List + extraCharges; - private String postalCode; + private Map extraParams; - private String state; + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address build() { - return new PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address( - this.city, - this.country, + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total( + this.amount, + this.creditReason, + this.currency, + this.discounts, + this.extraCharges, this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); + this.tax); } - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; + /** Required. Total flight amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Reason for credit. */ + public Builder setCreditReason( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.CreditReason + creditReason) { + this.creditReason = creditReason; + return this; + } + + /** Total currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details. */ + public Builder setDiscounts( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Discounts discounts) { + this.discounts = discounts; return this; } /** - * Two-letter country code (ISO - * 3166-1 alpha-2). + * 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.FlightData.Total#extraCharges} for the field + * documentation. */ - public Builder setCountry(String country) { - this.country = country; + public Builder addExtraCharge( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.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.FlightData.Total#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.PaymentMethodData.BillingDetails.Address#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.FlightData.Total#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9426,9 +9586,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.FlightData.Total#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9438,531 +9597,594 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; + /** Tax breakdown. */ + public Builder setTax( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax tax) { + this.tax = tax; return this; } + } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Discounts(String corporateClientCode, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.extraParams = extraParams; } - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; + public static Builder builder() { + return new Builder(); } - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static class Builder { + private String corporateClientCode; - private Blik(Map extraParams) { - this.extraParams = extraParams; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Discounts build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Discounts( + this.corporateClientCode, this.extraParams); + } - public static class Builder { - private Map extraParams; + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - /** 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.PaymentDetails.FlightData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + 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.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.PaymentDetails.FlightData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of additional charges. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 additional charges. */ + @SerializedName("type") + Type type; + + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static Builder builder() { + return new Builder(); + } - /** - * Required. The tax ID of the customer (CPF for individual consumers or CNPJ - * for businesses consumers) - */ - @SerializedName("tax_id") - String taxId; + public static class Builder { + private Long amount; - private Boleto(Map extraParams, String taxId) { - this.extraParams = extraParams; - this.taxId = taxId; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private Type type; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.ExtraCharge build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } - private String taxId; + /** Amount of additional charges. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** 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.PaymentDetails.FlightData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + 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.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.PaymentDetails.FlightData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + /** Type of additional charges. */ + public Builder setType( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } } - 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 - @EqualsAndHashCode(callSuper = false) - 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; + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("additional_fees") + ADDITIONAL_FEES("additional_fees"), - private Cashapp(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("ancillary_service_charges") + ANCILLARY_SERVICE_CHARGES("ancillary_service_charges"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("exchange_fee") + EXCHANGE_FEE("exchange_fee"); - public static class Builder { - private Map extraParams; + @Getter(onMethod_ = {@Override}) + private final String value; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Cashapp build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Cashapp(this.extraParams); + Type(String value) { + this.value = value; + } + } } - /** - * Add a key/value pair to `extraParams` map. 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<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; + + private Tax( + Map extraParams, + List taxes) { + this.extraParams = extraParams; + this.taxes = taxes; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Crypto { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Map extraParams; - private Crypto(Map extraParams) { - this.extraParams = extraParams; - } + private List taxes; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax( + this.extraParams, this.taxes); + } - public static class Builder { - private Map 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.PaymentDetails.FlightData.Total.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Crypto build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Crypto(this.extraParams); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.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; + } - /** - * Add a key/value pair to `extraParams` map. 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.Crypto#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Add an element to `taxes` 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.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. 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.Crypto#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all elements to `taxes` 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.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; - private CustomerBalance(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** Tax rate. */ + @SerializedName("rate") + Long rate; - public static class Builder { - private Map extraParams; + /** Type of tax. */ + @SerializedName("type") + String type; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance build() { - return new PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance(this.extraParams); - } + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - /** - * Add a key/value pair to `extraParams` map. 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; - } + public static Builder builder() { + return new Builder(); + } - /** - * Add all map key/value pairs to `extraParams` map. 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; - } - } - } + public static class Builder { + private Long amount; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Eps { - /** The customer's bank. */ - @SerializedName("bank") - Bank bank; + private Map extraParams; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Long rate; - private Eps(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + private String type; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.Tax build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - public static class Builder { - private Bank bank; + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - private Map 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.PaymentDetails.FlightData.Total.Tax.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Eps build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Eps(this.bank, this.extraParams); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.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; + } - /** The customer's bank. */ - public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Eps.Bank bank) { - this.bank = bank; - return this; - } + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + 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<>(); + /** Type of tax. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. 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 CreditReason implements ApiRequestParams.EnumParam { + @SerializedName("other") + OTHER("other"), - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("arzte_und_apotheker_bank") - ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"), + @SerializedName("partial_ticket_refund") + PARTIAL_TICKET_REFUND("partial_ticket_refund"), - @SerializedName("austrian_anadi_bank_ag") - AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"), + @SerializedName("passenger_transport_ancillary_cancellation") + PASSENGER_TRANSPORT_ANCILLARY_CANCELLATION("passenger_transport_ancillary_cancellation"), - @SerializedName("bank_austria") - BANK_AUSTRIA("bank_austria"), + @SerializedName("ticket_and_ancillary_cancellation") + TICKET_AND_ANCILLARY_CANCELLATION("ticket_and_ancillary_cancellation"), - @SerializedName("bankhaus_carl_spangler") - BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), + @SerializedName("ticket_cancellation") + TICKET_CANCELLATION("ticket_cancellation"); - @SerializedName("bankhaus_schelhammer_und_schattera_ag") - BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("bawag_psk_ag") - BAWAG_PSK_AG("bawag_psk_ag"), + CreditReason(String value) { + this.value = value; + } + } + } - @SerializedName("bks_bank_ag") - BKS_BANK_AG("bks_bank_ag"), + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("exchange_ticket") + EXCHANGE_TICKET("exchange_ticket"), - @SerializedName("brull_kallmus_bank_ag") - BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), - @SerializedName("btv_vier_lander_bank") - BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), + @SerializedName("refund") + REFUND("refund"), - @SerializedName("capital_bank_grawe_gruppe_ag") - CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), + @SerializedName("ticket_purchase") + TICKET_PURCHASE("ticket_purchase"); - @SerializedName("deutsche_bank_ag") - DEUTSCHE_BANK_AG("deutsche_bank_ag"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("dolomitenbank") - DOLOMITENBANK("dolomitenbank"), + TransactionType(String value) { + this.value = value; + } + } + } - @SerializedName("easybank_ag") - EASYBANK_AG("easybank_ag"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Lodging { + /** The lodging location's address. */ + @SerializedName("address") + Address address; - @SerializedName("erste_bank_und_sparkassen") - ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), + /** The number of adults on the booking. */ + @SerializedName("adults") + Long adults; - @SerializedName("hypo_alpeadriabank_international_ag") - HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - @SerializedName("hypo_bank_burgenland_aktiengesellschaft") - HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), + /** The booking number associated with the lodging reservation. */ + @SerializedName("booking_number") + String bookingNumber; - @SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien") - HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), + /** The lodging category. */ + @SerializedName("category") + Category category; - @SerializedName("hypo_oberosterreich_salzburg_steiermark") - HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"), + /** + * Required. Lodging check-in time. Measured in seconds since the Unix epoch. + */ + @SerializedName("checkin_at") + Long checkinAt; - @SerializedName("hypo_tirol_bank_ag") - HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"), + /** + * Required. Lodging check-out time. Measured in seconds since the Unix + * epoch. + */ + @SerializedName("checkout_at") + Long checkoutAt; - @SerializedName("hypo_vorarlberg_bank_ag") - HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"), + /** The customer service phone number of the lodging company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; - @SerializedName("marchfelder_bank") - MARCHFELDER_BANK("marchfelder_bank"), + /** The daily lodging room rate. */ + @SerializedName("daily_room_rate_amount") + Long dailyRoomRateAmount; - @SerializedName("oberbank_ag") - OBERBANK_AG("oberbank_ag"), + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - @SerializedName("raiffeisen_bankengruppe_osterreich") - RAIFFEISEN_BANKENGRUPPE_OSTERREICH("raiffeisen_bankengruppe_osterreich"), + /** List of additional charges being billed. */ + @SerializedName("extra_charges") + List extraCharges; - @SerializedName("schoellerbank_ag") - SCHOELLERBANK_AG("schoellerbank_ag"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("sparda_bank_wien") - SPARDA_BANK_WIEN("sparda_bank_wien"), + /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ + @SerializedName("fire_safety_act_compliance") + Boolean fireSafetyActCompliance; - @SerializedName("volksbank_gruppe") - VOLKSBANK_GRUPPE("volksbank_gruppe"), + /** The name of the lodging location. */ + @SerializedName("name") + String name; - @SerializedName("volkskreditbank_ag") - VOLKSKREDITBANK_AG("volkskreditbank_ag"), + /** + * Indicates if the customer did not keep their booking while failing to cancel the + * reservation. + */ + @SerializedName("no_show") + Boolean noShow; - @SerializedName("vr_bank_braunau") - VR_BANK_BRAUNAU("vr_bank_braunau"); + /** The number of rooms on the booking. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The details of the passengers in the travel reservation. */ + @SerializedName("passengers") + List passengers; - Bank(String value) { - this.value = value; - } - } - } + /** The phone number of the lodging location. */ + @SerializedName("property_phone_number") + String propertyPhoneNumber; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Fpx { - /** Account holder type for FPX transaction. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + /** The room class for this purchase. */ + @SerializedName("room_class") + String roomClass; - /** Required. The customer's bank. */ - @SerializedName("bank") - Bank bank; + /** The number of room nights. */ + @SerializedName("room_nights") + Long roomNights; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 total tax amount associating with the room reservation. */ + @SerializedName("total_room_tax_amount") + Long totalRoomTaxAmount; - private Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) { - this.accountHolderType = accountHolderType; - this.bank = bank; + /** 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() { @@ -9970,241 +10192,181 @@ public static Builder builder() { } public static class Builder { - private AccountHolderType accountHolderType; + private Address address; - private Bank bank; + private Long adults; - private Map extraParams; + private Affiliate affiliate; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Fpx build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Fpx( - this.accountHolderType, this.bank, this.extraParams); - } + private String bookingNumber; - /** Account holder type for FPX transaction. */ - public Builder setAccountHolderType( - PaymentIntentConfirmParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + private Category category; - /** Required. The customer's bank. */ - public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Fpx.Bank bank) { - this.bank = bank; - return this; - } + private Long checkinAt; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Fpx#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Long checkoutAt; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Fpx#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } + private String customerServicePhoneNumber; - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + private Long dailyRoomRateAmount; - @SerializedName("individual") - INDIVIDUAL("individual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - AccountHolderType(String value) { - this.value = value; - } - } - - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("affin_bank") - AFFIN_BANK("affin_bank"), - - @SerializedName("agrobank") - AGROBANK("agrobank"), - - @SerializedName("alliance_bank") - ALLIANCE_BANK("alliance_bank"), - - @SerializedName("ambank") - AMBANK("ambank"), - - @SerializedName("bank_islam") - BANK_ISLAM("bank_islam"), - - @SerializedName("bank_muamalat") - BANK_MUAMALAT("bank_muamalat"), + private Delivery delivery; - @SerializedName("bank_of_china") - BANK_OF_CHINA("bank_of_china"), + private List extraCharges; - @SerializedName("bank_rakyat") - BANK_RAKYAT("bank_rakyat"), + private Map extraParams; - @SerializedName("bsn") - BSN("bsn"), + private Boolean fireSafetyActCompliance; - @SerializedName("cimb") - CIMB("cimb"), + private String name; - @SerializedName("deutsche_bank") - DEUTSCHE_BANK("deutsche_bank"), + private Boolean noShow; - @SerializedName("hong_leong_bank") - HONG_LEONG_BANK("hong_leong_bank"), + private Long numberOfRooms; - @SerializedName("hsbc") - HSBC("hsbc"), + private List passengers; - @SerializedName("kfh") - KFH("kfh"), + private String propertyPhoneNumber; - @SerializedName("maybank2e") - MAYBANK2E("maybank2e"), + private String roomClass; - @SerializedName("maybank2u") - MAYBANK2U("maybank2u"), + private Long roomNights; - @SerializedName("ocbc") - OCBC("ocbc"), + private Long totalRoomTaxAmount; - @SerializedName("pb_enterprise") - PB_ENTERPRISE("pb_enterprise"), + private Long totalTaxAmount; - @SerializedName("public_bank") - PUBLIC_BANK("public_bank"), + /** 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); + } - @SerializedName("rhb") - RHB("rhb"), + /** The lodging location's address. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Address address) { + this.address = address; + return this; + } - @SerializedName("standard_chartered") - STANDARD_CHARTERED("standard_chartered"), + /** The number of adults on the booking. */ + public Builder setAdults(Long adults) { + this.adults = adults; + return this; + } - @SerializedName("uob") - UOB("uob"); + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The booking number associated with the lodging reservation. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } - Bank(String value) { - this.value = value; + /** The lodging category. */ + public Builder setCategory( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Category category) { + this.category = category; + return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Giropay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Required. Lodging check-in time. Measured in seconds since the Unix + * epoch. + */ + public Builder setCheckinAt(Long checkinAt) { + this.checkinAt = checkinAt; + return this; + } - private Giropay(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Required. Lodging check-out time. Measured in seconds since the Unix + * epoch. + */ + public Builder setCheckoutAt(Long checkoutAt) { + this.checkoutAt = checkoutAt; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** The customer service phone number of the lodging company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } - public static class Builder { - private Map extraParams; + /** The daily lodging room rate. */ + public Builder setDailyRoomRateAmount(Long dailyRoomRateAmount) { + this.dailyRoomRateAmount = dailyRoomRateAmount; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Giropay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Giropay(this.extraParams); + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentConfirmParams.PaymentDetails.Lodging.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.PaymentMethodData.Giropay#extraParams} for the - * field documentation. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addExtraCharge( + PaymentIntentConfirmParams.PaymentDetails.Lodging.ExtraCharge element) { + if (this.extraCharges == null) { + this.extraCharges = new ArrayList<>(); } - this.extraParams.put(key, value); + this.extraCharges.add(element); return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Giropay#extraParams} for the - * field documentation. + * 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addAllExtraCharge( + List elements) { + if (this.extraCharges == null) { + this.extraCharges = new ArrayList<>(); } - this.extraParams.putAll(map); + this.extraCharges.addAll(elements); return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Gopay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Gopay(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.Gopay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Gopay(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.Gopay#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -10218,7 +10380,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Gopay#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -10228,519 +10390,352 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Grabpay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Grabpay(Map extraParams) { - this.extraParams = extraParams; - } + /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ + public Builder setFireSafetyActCompliance(Boolean fireSafetyActCompliance) { + this.fireSafetyActCompliance = fireSafetyActCompliance; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** The name of the lodging location. */ + public Builder setName(String name) { + this.name = name; + return this; + } - public static class Builder { - private Map extraParams; + /** + * 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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Grabpay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Grabpay(this.extraParams); + /** The number of rooms on the booking. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + 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.Grabpay#extraParams} for the - * field documentation. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addPassenger( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); } - this.extraParams.put(key, value); + this.passengers.add(element); return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the - * field documentation. + * 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addAllPassenger( + List elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); } - this.extraParams.putAll(map); + this.passengers.addAll(elements); return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class IdBankTransfer { - /** Bank where the account is held. */ - @SerializedName("bank") - Bank bank; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private IdBankTransfer(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Bank bank; - private Map extraParams; + /** The phone number of the lodging location. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer build() { - return new PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer( - this.bank, this.extraParams); + /** The room class for this purchase. */ + public Builder setRoomClass(String roomClass) { + this.roomClass = roomClass; + return this; } - /** Bank where the account is held. */ - public Builder setBank( - PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer.Bank bank) { - this.bank = bank; + /** The number of room nights. */ + public Builder setRoomNights(Long roomNights) { + this.roomNights = roomNights; return this; } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + /** The total tax amount associating with the room reservation. */ + public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { + this.totalRoomTaxAmount = totalRoomTaxAmount; return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + /** The total tax amount. */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; return this; } } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("bca") - BCA("bca"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - @SerializedName("bni") - BNI("bni"), + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - @SerializedName("bri") - BRI("bri"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("cimb") - CIMB("cimb"), + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; - @SerializedName("permata") - PERMATA("permata"); + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - @Getter(onMethod_ = {@Override}) - private final String value; + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; - Bank(String value) { - this.value = value; + /** 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; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Ideal { - /** - * The customer's bank. Only use this parameter for existing customers. Don't use it for new - * customers. - */ - @SerializedName("bank") - Bank bank; + public static Builder builder() { + return new Builder(); + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private String city; - private Ideal(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + private String country; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Bank bank; + private String line1; - private Map extraParams; + private String line2; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Ideal build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Ideal( - this.bank, this.extraParams); - } + private String postalCode; - /** - * The customer's bank. Only use this parameter for existing customers. Don't use it for new - * customers. - */ - public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Ideal.Bank bank) { - this.bank = bank; - return this; - } + private String state; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Ideal#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** 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); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Ideal#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; } - this.extraParams.putAll(map); - return this; - } - } - - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("abn_amro") - ABN_AMRO("abn_amro"), - - @SerializedName("asn_bank") - ASN_BANK("asn_bank"), - @SerializedName("bunq") - BUNQ("bunq"), + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - @SerializedName("buut") - BUUT("buut"), + /** + * Add a key/value pair to `extraParams` map. 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; + } - @SerializedName("handelsbanken") - HANDELSBANKEN("handelsbanken"), + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - @SerializedName("ing") - ING("ing"), + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } - @SerializedName("knab") - KNAB("knab"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - @SerializedName("moneyou") - MONEYOU("moneyou"), + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("n26") - N26("n26"), + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } - @SerializedName("nn") - NN("nn"), + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - @SerializedName("rabobank") - RABOBANK("rabobank"), + /** Required. The name of the affiliate that originated the purchase. */ + @SerializedName("name") + String name; - @SerializedName("regiobank") - REGIOBANK("regiobank"), + private Affiliate(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - @SerializedName("revolut") - REVOLUT("revolut"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("sns_bank") - SNS_BANK("sns_bank"), + public static class Builder { + private Map extraParams; - @SerializedName("triodos_bank") - TRIODOS_BANK("triodos_bank"), + private String name; - @SerializedName("van_lanschot") - VAN_LANSCHOT("van_lanschot"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate( + this.extraParams, this.name); + } - @SerializedName("yoursafe") - YOURSAFE("yoursafe"); + /** + * Add a key/value pair to `extraParams` map. 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * 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; + } - Bank(String value) { - this.value = value; + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + return this; + } } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class InteracPresent { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - private InteracPresent(Map extraParams) { - this.extraParams = extraParams; - } + /** The delivery method for the payment. */ + @SerializedName("mode") + Mode mode; - public static Builder builder() { - return new Builder(); - } + /** Details of the recipient. */ + @SerializedName("recipient") + Recipient recipient; - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.InteracPresent build() { - return new PaymentIntentConfirmParams.PaymentMethodData.InteracPresent(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.InteracPresent#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.InteracPresent#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KakaoPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private KakaoPay(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.KakaoPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.KakaoPay(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.KakaoPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.KakaoPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Klarna { - /** Customer's date of birth. */ - @SerializedName("dob") - Dob dob; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Klarna(Dob dob, Map extraParams) { - this.dob = dob; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Dob dob; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Klarna build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Klarna( - this.dob, this.extraParams); - } - - /** Customer's date of birth. */ - public Builder setDob(PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob dob) { - this.dob = dob; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Dob { - /** Required. The day of birth, between 1 and 31. */ - @SerializedName("day") - Long day; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Required. The month of birth, between 1 and 12. */ - @SerializedName("month") - Long month; - - /** Required. The four-digit year of birth. */ - @SerializedName("year") - Long year; - - private Dob(Long day, Map extraParams, Long month, Long year) { - this.day = day; + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; - this.month = month; - this.year = year; + this.mode = mode; + this.recipient = recipient; } public static Builder builder() { @@ -10748,30 +10743,22 @@ public static Builder builder() { } public static class Builder { - private Long day; - private Map extraParams; - private Long month; + private Mode mode; - private Long year; + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob( - this.day, this.extraParams, this.month, this.year); - } - - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; - return this; + 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.PaymentMethodData.Klarna.Dob#extraParams} + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -10785,7 +10772,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob#extraParams} + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -10796,256 +10783,295 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Mode mode) { + this.mode = mode; return this; } - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Konbini { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - private Konbini(Map extraParams) { - this.extraParams = extraParams; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @SerializedName("email") + String email; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + String name; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Konbini build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Konbini(this.extraParams); - } + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + String phone; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Recipient( + String email, Map extraParams, String name, String phone) { + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KrCard { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private String email; - private KrCard(Map extraParams) { - this.extraParams = extraParams; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String name; - public static class Builder { - private Map extraParams; + private String phone; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.KrCard build() { - return new PaymentIntentConfirmParams.PaymentMethodData.KrCard(this.extraParams); - } + /** 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); + } - /** - * Add a key/value pair to `extraParams` map. 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.KrCard#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. 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.KrCard#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. 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; + } } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Link { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("email") + EMAIL("email"), - private Link(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("phone") + PHONE("phone"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("pickup") + PICKUP("pickup"), - public static class Builder { - private Map extraParams; + @SerializedName("post") + POST("post"); - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Link build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Link(this.extraParams); + @Getter(onMethod_ = {@Override}) + private final String value; + + Mode(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passenger { /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the - * field documentation. + * Required. Full name of the person or entity on the lodging reservation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + @SerializedName("name") + String name; + + private Passenger(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MbWay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - private MbWay(Map extraParams) { - this.extraParams = extraParams; - } + public static class Builder { + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String name; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger build() { + return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger( + this.extraParams, this.name); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.MbWay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.MbWay(this.extraParams); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * 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 a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. 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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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.MbWay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Required. Full name of the person or entity on the lodging + * reservation. + */ + public Builder setName(String name) { + this.name = name; + return this; } - this.extraParams.putAll(map); - 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 @EqualsAndHashCode(callSuper = false) - public static class Mobilepay { + public static class LodgingData { + /** Accommodation details for the lodging. */ + @SerializedName("accommodation") + Accommodation accommodation; + + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Booking confirmation number for the lodging. */ + @SerializedName("booking_number") + String bookingNumber; + + /** Required. Check-in date. */ + @SerializedName("checkin_at") + Long checkinAt; + + /** Required. Check-out date. */ + @SerializedName("checkout_at") + Long checkoutAt; + + /** Customer service phone number for the lodging company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -11055,8 +11081,69 @@ public static class Mobilepay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Mobilepay(Map extraParams) { + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + @SerializedName("fire_safety_act_compliance_indicator") + Boolean fireSafetyActComplianceIndicator; + + /** List of guests for the lodging. */ + @SerializedName("guests") + List guests; + + /** Host details for the lodging. */ + @SerializedName("host") + Host host; + + /** List of insurances for the lodging. */ + @SerializedName("insurances") + List insurances; + + /** Whether the renter is a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; + + /** Renter ID number for the lodging. */ + @SerializedName("renter_id_number") + String renterIdNumber; + + /** Renter name for the lodging. */ + @SerializedName("renter_name") + String renterName; + + /** Required. Total details for the lodging. */ + @SerializedName("total") + Total total; + + private LodgingData( + Accommodation accommodation, + Affiliate affiliate, + String bookingNumber, + Long checkinAt, + Long checkoutAt, + String customerServicePhoneNumber, + Map extraParams, + Boolean fireSafetyActComplianceIndicator, + List guests, + Host host, + List insurances, + Boolean noShowIndicator, + String renterIdNumber, + String renterName, + Total total) { + this.accommodation = accommodation; + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.checkinAt = checkinAt; + this.checkoutAt = checkoutAt; + this.customerServicePhoneNumber = customerServicePhoneNumber; this.extraParams = extraParams; + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + this.guests = guests; + this.host = host; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.renterIdNumber = renterIdNumber; + this.renterName = renterName; + this.total = total; } public static Builder builder() { @@ -11064,75 +11151,98 @@ public static Builder builder() { } public static class Builder { + private Accommodation accommodation; + + private Affiliate affiliate; + + private String bookingNumber; + + private Long checkinAt; + + private Long checkoutAt; + + private String customerServicePhoneNumber; + private Map extraParams; + private Boolean fireSafetyActComplianceIndicator; + + private List guests; + + private Host host; + + private List insurances; + + private Boolean noShowIndicator; + + private String renterIdNumber; + + private String renterName; + + private Total total; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Mobilepay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Mobilepay(this.extraParams); + public PaymentIntentConfirmParams.PaymentDetails.LodgingData build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData( + this.accommodation, + this.affiliate, + this.bookingNumber, + this.checkinAt, + this.checkoutAt, + this.customerServicePhoneNumber, + this.extraParams, + this.fireSafetyActComplianceIndicator, + this.guests, + this.host, + this.insurances, + this.noShowIndicator, + this.renterIdNumber, + this.renterName, + this.total); } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + /** Accommodation details for the lodging. */ + public Builder setAccommodation( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Accommodation accommodation) { + this.accommodation = accommodation; return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Multibanco { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - private Multibanco(Map extraParams) { - this.extraParams = extraParams; - } + /** Booking confirmation number for the lodging. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Required. Check-in date. */ + public Builder setCheckinAt(Long checkinAt) { + this.checkinAt = checkinAt; + return this; + } - public static class Builder { - private Map extraParams; + /** Required. Check-out date. */ + public Builder setCheckoutAt(Long checkoutAt) { + this.checkoutAt = checkoutAt; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Multibanco build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Multibanco(this.extraParams); + /** Customer service phone number for the lodging company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + 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.Multibanco#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.LodgingData#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -11146,7 +11256,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Multibanco#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.LodgingData#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -11156,1193 +11266,1007 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NaverPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. - */ - @SerializedName("funding") - Funding funding; - - private NaverPay(Map extraParams, Funding funding) { - this.extraParams = extraParams; - this.funding = funding; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Funding funding; + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + public Builder setFireSafetyActComplianceIndicator( + Boolean fireSafetyActComplianceIndicator) { + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.NaverPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.NaverPay( - this.extraParams, this.funding); + /** + * Add an element to `guests` 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.LodgingData#guests} for the field + * documentation. + */ + public Builder addGuest( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Guest element) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.add(element); + 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.NaverPay#extraParams} for - * the field documentation. + * Add all elements to `guests` 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.LodgingData#guests} for the field + * documentation. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addAllGuest( + List elements) { + if (this.guests == null) { + this.guests = new ArrayList<>(); } - this.extraParams.put(key, value); + this.guests.addAll(elements); + return this; + } + + /** Host details for the lodging. */ + public Builder setHost(PaymentIntentConfirmParams.PaymentDetails.LodgingData.Host host) { + this.host = host; return this; } /** - * Add all map key/value pairs to `extraParams` map. 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.NaverPay#extraParams} for - * the field documentation. + * Add an element to `insurances` 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.LodgingData#insurances} for the field + * documentation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); } - this.extraParams.putAll(map); + this.insurances.add(element); return this; } /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. + * Add all elements to `insurances` 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.LodgingData#insurances} for the field + * documentation. */ - public Builder setFunding( - PaymentIntentConfirmParams.PaymentMethodData.NaverPay.Funding funding) { - this.funding = funding; + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); return this; } - } - public enum Funding implements ApiRequestParams.EnumParam { - @SerializedName("card") - CARD("card"), + /** Whether the renter is a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } - @SerializedName("points") - POINTS("points"); + /** Renter ID number for the lodging. */ + public Builder setRenterIdNumber(String renterIdNumber) { + this.renterIdNumber = renterIdNumber; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Renter name for the lodging. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } - Funding(String value) { - this.value = value; + /** Required. Total details for the lodging. */ + public Builder setTotal(PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total total) { + this.total = total; + return this; } } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NzBankAccount { - /** - * The name on the bank account. Only required if the account holder name is different from - * the name of the authorized signatory collected in the PaymentMethod’s billing details. - */ - @SerializedName("account_holder_name") - String accountHolderName; - /** Required. The account number for the bank account. */ - @SerializedName("account_number") - String accountNumber; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Accommodation { + /** Type of accommodation. */ + @SerializedName("accommodation_type") + AccommodationType accommodationType; - /** Required. The numeric code for the bank account's bank. */ - @SerializedName("bank_code") - String bankCode; + /** Bed type. */ + @SerializedName("bed_type") + String bedType; - /** Required. The numeric code for the bank account's bank branch. */ - @SerializedName("branch_code") - String branchCode; + /** Daily accommodation rate in cents. */ + @SerializedName("daily_rate_amount") + Long dailyRateAmount; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("reference") - String reference; + /** Number of nights. */ + @SerializedName("nights") + Long nights; - /** Required. The suffix of the bank account number. */ - @SerializedName("suffix") - String suffix; + /** Number of rooms, cabanas, apartments, and so on. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; - private NzBankAccount( - String accountHolderName, - String accountNumber, - String bankCode, - String branchCode, - Map extraParams, - String reference, - String suffix) { - this.accountHolderName = accountHolderName; - this.accountNumber = accountNumber; - this.bankCode = bankCode; - this.branchCode = branchCode; - this.extraParams = extraParams; - this.reference = reference; - this.suffix = suffix; - } + /** Rate type. */ + @SerializedName("rate_type") + String rateType; - public static Builder builder() { - return new Builder(); - } + /** Whether smoking is allowed. */ + @SerializedName("smoking_indicator") + Boolean smokingIndicator; - public static class Builder { - private String accountHolderName; + private Accommodation( + AccommodationType accommodationType, + String bedType, + Long dailyRateAmount, + Map extraParams, + Long nights, + Long numberOfRooms, + String rateType, + Boolean smokingIndicator) { + this.accommodationType = accommodationType; + this.bedType = bedType; + this.dailyRateAmount = dailyRateAmount; + this.extraParams = extraParams; + this.nights = nights; + this.numberOfRooms = numberOfRooms; + this.rateType = rateType; + this.smokingIndicator = smokingIndicator; + } - private String accountNumber; + public static Builder builder() { + return new Builder(); + } - private String bankCode; + public static class Builder { + private AccommodationType accommodationType; - private String branchCode; + private String bedType; - private Map extraParams; + private Long dailyRateAmount; - private String reference; + private Map extraParams; - private String suffix; + private Long nights; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.NzBankAccount build() { - return new PaymentIntentConfirmParams.PaymentMethodData.NzBankAccount( - this.accountHolderName, - this.accountNumber, - this.bankCode, - this.branchCode, - this.extraParams, - this.reference, - this.suffix); - } + private Long numberOfRooms; - /** - * The name on the bank account. Only required if the account holder name is different from - * the name of the authorized signatory collected in the PaymentMethod’s billing details. - */ - public Builder setAccountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; - return this; - } + private String rateType; - /** Required. The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + private Boolean smokingIndicator; - /** Required. The numeric code for the bank account's bank. */ - public Builder setBankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Accommodation build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Accommodation( + this.accommodationType, + this.bedType, + this.dailyRateAmount, + this.extraParams, + this.nights, + this.numberOfRooms, + this.rateType, + this.smokingIndicator); + } - /** Required. The numeric code for the bank account's bank branch. */ - public Builder setBranchCode(String branchCode) { - this.branchCode = branchCode; - return this; - } + /** Type of accommodation. */ + public Builder setAccommodationType( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Accommodation.AccommodationType + accommodationType) { + this.accommodationType = accommodationType; + 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.NzBankAccount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Bed type. */ + public Builder setBedType(String bedType) { + this.bedType = bedType; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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.NzBankAccount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Daily accommodation rate in cents. */ + public Builder setDailyRateAmount(Long dailyRateAmount) { + this.dailyRateAmount = dailyRateAmount; + return this; } - this.extraParams.putAll(map); - return this; - } - public Builder setReference(String reference) { - this.reference = reference; - 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.LodgingData.Accommodation#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Required. The suffix of the bank account number. */ - public Builder setSuffix(String suffix) { - this.suffix = suffix; - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Oxxo { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Oxxo(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.Accommodation#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - public static class Builder { - private Map extraParams; + /** Number of nights. */ + public Builder setNights(Long nights) { + this.nights = nights; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Oxxo build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Oxxo(this.extraParams); - } + /** Number of rooms, cabanas, apartments, and so on. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + 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.Oxxo#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Rate type. */ + public Builder setRateType(String rateType) { + this.rateType = rateType; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Oxxo#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Whether smoking is allowed. */ + public Builder setSmokingIndicator(Boolean smokingIndicator) { + this.smokingIndicator = smokingIndicator; + return this; } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class P24 { - /** The customer's bank. */ - @SerializedName("bank") - Bank bank; + public enum AccommodationType implements ApiRequestParams.EnumParam { + @SerializedName("apartment") + APARTMENT("apartment"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("cabana") + CABANA("cabana"), - private P24(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + @SerializedName("house") + HOUSE("house"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("penthouse") + PENTHOUSE("penthouse"), - public static class Builder { - private Bank bank; + @SerializedName("room") + ROOM("room"), - private Map extraParams; + @SerializedName("standard") + STANDARD("standard"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.P24 build() { - return new PaymentIntentConfirmParams.PaymentMethodData.P24(this.bank, this.extraParams); - } + @SerializedName("suite") + SUITE("suite"), - /** The customer's bank. */ - public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.P24.Bank bank) { - this.bank = bank; - return this; - } + @SerializedName("villa") + VILLA("villa"); - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.P24#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.P24#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + AccommodationType(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("alior_bank") - ALIOR_BANK("alior_bank"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; - @SerializedName("bank_millennium") - BANK_MILLENNIUM("bank_millennium"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("bank_nowy_bfg_sa") - BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), + /** Affiliate partner name. */ + @SerializedName("name") + String name; - @SerializedName("bank_pekao_sa") - BANK_PEKAO_SA("bank_pekao_sa"), + private Affiliate(String code, Map extraParams, String name) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + } - @SerializedName("banki_spbdzielcze") - BANKI_SPBDZIELCZE("banki_spbdzielcze"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("blik") - BLIK("blik"), + public static class Builder { + private String code; - @SerializedName("bnp_paribas") - BNP_PARIBAS("bnp_paribas"), + private Map extraParams; - @SerializedName("boz") - BOZ("boz"), + private String name; - @SerializedName("citi_handlowy") - CITI_HANDLOWY("citi_handlowy"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Affiliate( + this.code, this.extraParams, this.name); + } - @SerializedName("credit_agricole") - CREDIT_AGRICOLE("credit_agricole"), + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + return this; + } - @SerializedName("envelobank") - ENVELOBANK("envelobank"), + /** + * Add a key/value pair to `extraParams` map. 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.LodgingData.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; + } - @SerializedName("etransfer_pocztowy24") - ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.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; + } - @SerializedName("getin_bank") - GETIN_BANK("getin_bank"), + /** Affiliate partner name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } - @SerializedName("ideabank") - IDEABANK("ideabank"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Guest { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("ing") - ING("ing"), + /** Required. Guest's full name. */ + @SerializedName("name") + String name; - @SerializedName("inteligo") - INTELIGO("inteligo"), + private Guest(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - @SerializedName("mbank_mtransfer") - MBANK_MTRANSFER("mbank_mtransfer"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("nest_przelew") - NEST_PRZELEW("nest_przelew"), + public static class Builder { + private Map extraParams; - @SerializedName("noble_pay") - NOBLE_PAY("noble_pay"), - - @SerializedName("pbac_z_ipko") - PBAC_Z_IPKO("pbac_z_ipko"), + private String name; - @SerializedName("plus_bank") - PLUS_BANK("plus_bank"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Guest build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Guest( + this.extraParams, this.name); + } - @SerializedName("santander_przelew24") - SANTANDER_PRZELEW24("santander_przelew24"), + /** + * Add a key/value pair to `extraParams` map. 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.LodgingData.Guest#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("tmobile_usbugi_bankowe") - TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.Guest#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - @SerializedName("toyota_bank") - TOYOTA_BANK("toyota_bank"), + /** Required. Guest's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } - @SerializedName("velobank") - VELOBANK("velobank"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Host { + /** Address of the host. */ + @SerializedName("address") + Address address; - @SerializedName("volkswagen_bank") - VOLKSWAGEN_BANK("volkswagen_bank"); + /** Host's country of domicile. */ + @SerializedName("country_of_domicile") + String countryOfDomicile; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - Bank(String value) { - this.value = value; - } - } - } + /** Reference number for the host. */ + @SerializedName("host_reference") + String hostReference; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PayByBank { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 host. */ + @SerializedName("host_type") + HostType hostType; - private PayByBank(Map extraParams) { - this.extraParams = extraParams; - } + /** Name of the lodging property or host. */ + @SerializedName("name") + String name; - public static Builder builder() { - return new Builder(); - } + /** Total number of reservations for the host. */ + @SerializedName("number_of_reservations") + Long numberOfReservations; - public static class Builder { - private Map extraParams; + /** Property phone number. */ + @SerializedName("property_phone_number") + String propertyPhoneNumber; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.PayByBank build() { - return new PaymentIntentConfirmParams.PaymentMethodData.PayByBank(this.extraParams); - } + /** Host's registration date. */ + @SerializedName("registered_at") + Long registeredAt; - /** - * Add a key/value pair to `extraParams` map. 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.PayByBank#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + private Host( + Address address, + String countryOfDomicile, + Map extraParams, + String hostReference, + HostType hostType, + String name, + Long numberOfReservations, + String propertyPhoneNumber, + Long registeredAt) { + this.address = address; + this.countryOfDomicile = countryOfDomicile; + this.extraParams = extraParams; + this.hostReference = hostReference; + this.hostType = hostType; + this.name = name; + this.numberOfReservations = numberOfReservations; + this.propertyPhoneNumber = propertyPhoneNumber; + this.registeredAt = registeredAt; } - /** - * Add all map key/value pairs to `extraParams` map. 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.PayByBank#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + public static Builder builder() { + return new Builder(); } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Payco { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - private Payco(Map extraParams) { - this.extraParams = extraParams; - } + public static class Builder { + private Address address; - public static Builder builder() { - return new Builder(); - } + private String countryOfDomicile; - public static class Builder { - private Map extraParams; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Payco build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Payco(this.extraParams); - } + private String hostReference; - /** - * Add a key/value pair to `extraParams` map. 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.Payco#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private HostType hostType; - /** - * Add all map key/value pairs to `extraParams` map. 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.Payco#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + private String name; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Paynow { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Long numberOfReservations; - private Paynow(Map extraParams) { - this.extraParams = extraParams; - } + private String propertyPhoneNumber; - public static Builder builder() { - return new Builder(); - } + private Long registeredAt; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Host build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Host( + this.address, + this.countryOfDomicile, + this.extraParams, + this.hostReference, + this.hostType, + this.name, + this.numberOfReservations, + this.propertyPhoneNumber, + this.registeredAt); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Paynow build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Paynow(this.extraParams); - } + /** Address of the host. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Host.Address address) { + this.address = address; + 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.Paynow#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Host's country of domicile. */ + public Builder setCountryOfDomicile(String countryOfDomicile) { + this.countryOfDomicile = countryOfDomicile; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paynow#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. 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.LodgingData.Host#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Paypal { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.Host#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private Paypal(Map extraParams) { - this.extraParams = extraParams; - } + /** Reference number for the host. */ + public Builder setHostReference(String hostReference) { + this.hostReference = hostReference; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Type of host. */ + public Builder setHostType( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Host.HostType hostType) { + this.hostType = hostType; + return this; + } - public static class Builder { - private Map extraParams; + /** Name of the lodging property or host. */ + public Builder setName(String name) { + this.name = name; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Paypal build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Paypal(this.extraParams); - } + /** Total number of reservations for the host. */ + public Builder setNumberOfReservations(Long numberOfReservations) { + this.numberOfReservations = numberOfReservations; + 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.Paypal#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Property phone number. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypal#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Host's registration date. */ + public Builder setRegisteredAt(Long registeredAt) { + this.registeredAt = registeredAt; + return this; } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Paypay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - private Paypay(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Paypay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Paypay(this.extraParams); - } + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - /** - * Add a key/value pair to `extraParams` map. 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.Paypay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. 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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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.Paypay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Payto { - /** The account number for the bank account. */ - @SerializedName("account_number") - String accountNumber; + public static class Builder { + private String city; - /** Bank-State-Branch number of the bank account. */ - @SerializedName("bsb_number") - String bsbNumber; + private 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; + private Map extraParams; - /** The PayID alias for the bank account. */ - @SerializedName("pay_id") - String payId; + private String line1; - private Payto( - String accountNumber, String bsbNumber, Map extraParams, String payId) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; - this.extraParams = extraParams; - this.payId = payId; - } + private String line2; - public static Builder builder() { - return new Builder(); - } + private String postalCode; - public static class Builder { - private String accountNumber; + private String state; - private String bsbNumber; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Host.Address build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Host.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - private Map extraParams; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private String payId; + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Payto build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Payto( - this.accountNumber, this.bsbNumber, this.extraParams, this.payId); - } + /** + * Add a key/value pair to `extraParams` map. 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.LodgingData.Host.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; + } - /** The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.Host.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; + } - /** Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - return this; - } + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + 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.Payto#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. 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.Payto#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** The PayID alias for the bank account. */ - public Builder setPayId(String payId) { - this.payId = payId; - return this; + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + } } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Pix { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - private Pix(Map extraParams) { - this.extraParams = extraParams; - } + public enum HostType implements ApiRequestParams.EnumParam { + @SerializedName("hostel") + HOSTEL("hostel"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("hotel") + HOTEL("hotel"), - public static class Builder { - private Map extraParams; + @SerializedName("owner") + OWNER("owner"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Pix build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Pix(this.extraParams); - } + @SerializedName("rental_agency") + RENTAL_AGENCY("rental_agency"); - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Pix#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Pix#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + HostType(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Promptpay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Price of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; - private Promptpay(Map extraParams) { - this.extraParams = extraParams; - } + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Promptpay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Promptpay(this.extraParams); - } + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Promptpay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Promptpay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Qris { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Long amount; - private Qris(Map extraParams) { - this.extraParams = extraParams; - } + private String currency; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + private String insuranceCompanyName; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Qris build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Qris(this.extraParams); - } + private InsuranceType insuranceType; - /** - * Add a key/value pair to `extraParams` map. 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.Qris#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Insurance build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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.Qris#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. Price of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class RadarOptions { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * A Radar Session is a snapshot of - * the browser metadata and device details that help Radar make more accurate predictions on - * your payments. - */ - @SerializedName("session") - String session; - - private RadarOptions(Map extraParams, String session) { - this.extraParams = extraParams; - this.session = session; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private String session; + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.RadarOptions build() { - return new PaymentIntentConfirmParams.PaymentMethodData.RadarOptions( - this.extraParams, this.session); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + 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.RadarOptions#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RadarOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; } - this.extraParams.putAll(map); - return this; - } - /** - * A Radar Session is a snapshot - * of the browser metadata and device details that help Radar make more accurate predictions - * on your payments. - */ - public Builder setSession(String session) { - this.session = session; - return this; + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Rechnung { - /** Required. Customer's date of birth */ - @SerializedName("dob") - Dob dob; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Rechnung(Dob dob, Map extraParams) { - this.dob = dob; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - public static class Builder { - private Dob dob; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - private Map extraParams; + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Rechnung build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Rechnung( - this.dob, this.extraParams); - } + @SerializedName("emergency") + EMERGENCY("emergency"), - /** Required. Customer's date of birth */ - public Builder setDob(PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob dob) { - this.dob = dob; - return this; - } + @SerializedName("medical") + MEDICAL("medical"); - /** - * Add a key/value pair to `extraParams` map. 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.Rechnung#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Rechnung#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + InsuranceType(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Dob { - /** Required. The day of birth, between 1 and 31. */ - @SerializedName("day") - Long day; + public static class Total { + /** Required. Total price of the lodging reservation in cents. */ + @SerializedName("amount") + Long amount; + + /** Cash advances in cents. */ + @SerializedName("cash_advances") + Long cashAdvances; + + /** Currency of the total amount. */ + @SerializedName("currency") + String currency; + + /** Discount details for the lodging. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the lodging. */ + @SerializedName("extra_charges") + List extraCharges; /** * Map of extra parameters for custom features not available in this client library. The @@ -12354,19 +12278,32 @@ public static class Dob { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The month of birth, between 1 and 12. */ - @SerializedName("month") - Long month; + /** Prepaid amount in cents. */ + @SerializedName("prepaid_amount") + Long prepaidAmount; - /** Required. The four-digit year of birth. */ - @SerializedName("year") - Long year; + /** Tax breakdown for the lodging reservation. */ + @SerializedName("tax") + Tax tax; - private Dob(Long day, Map extraParams, Long month, Long year) { - this.day = day; + private Total( + Long amount, + Long cashAdvances, + String currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Long prepaidAmount, + Tax tax) { + this.amount = amount; + this.cashAdvances = cashAdvances; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.month = month; - this.year = year; + this.prepaidAmount = prepaidAmount; + this.tax = tax; } public static Builder builder() { @@ -12374,31 +12311,98 @@ public static Builder builder() { } public static class Builder { - private Long day; + private Long amount; + + private Long cashAdvances; + + private String currency; + + private Discounts discounts; + + private List + extraCharges; private Map extraParams; - private Long month; + private Long prepaidAmount; - private Long year; + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob( - this.day, this.extraParams, this.month, this.year); + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total( + this.amount, + this.cashAdvances, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.prepaidAmount, + this.tax); } - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; + /** Required. Total price of the lodging reservation in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Cash advances in cents. */ + public Builder setCashAdvances(Long cashAdvances) { + this.cashAdvances = cashAdvances; + return this; + } + + /** Currency of the total amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details for the lodging. */ + public Builder setDiscounts( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Discounts discounts) { + this.discounts = discounts; + 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.LodgingData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.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.LodgingData.Total#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.PaymentMethodData.Rechnung.Dob#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12411,8 +12415,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12422,437 +12427,462 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; + /** Prepaid amount in cents. */ + public Builder setPrepaidAmount(Long prepaidAmount) { + this.prepaidAmount = prepaidAmount; return this; } - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; + /** Tax breakdown for the lodging reservation. */ + public Builder setTax( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax tax) { + this.tax = tax; return this; } } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class RevolutPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private RevolutPay(Map extraParams) { - this.extraParams = extraParams; - } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - public static class Builder { - private Map extraParams; + /** Coupon code. */ + @SerializedName("coupon") + String coupon; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.RevolutPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.RevolutPay(this.extraParams); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RevolutPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Discounts( + String corporateClientCode, String coupon, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RevolutPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class SamsungPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private String corporateClientCode; - private SamsungPay(Map extraParams) { - this.extraParams = extraParams; - } + private String coupon; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Discounts build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Discounts( + this.corporateClientCode, this.coupon, this.extraParams); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.SamsungPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.SamsungPay(this.extraParams); - } + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + 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.SamsungPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Coupon code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. 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.SamsungPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. 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.LodgingData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } - this.extraParams.putAll(map); - return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Satispay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Satispay(Map extraParams) { - this.extraParams = extraParams; - } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; - public static class Builder { - private Map extraParams; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Satispay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Satispay(this.extraParams); - } + /** Type of extra charge. */ + @SerializedName("type") + Type type; - /** - * Add a key/value pair to `extraParams` map. 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.Satispay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. 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.Satispay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class SepaDebit { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Long amount; - /** Required. IBAN of the bank account. */ - @SerializedName("iban") - String iban; + private Map extraParams; - private SepaDebit(Map extraParams, String iban) { - this.extraParams = extraParams; - this.iban = iban; - } + private Type type; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.ExtraCharge build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } - public static class Builder { - private Map extraParams; + /** Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - private String iban; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.SepaDebit build() { - return new PaymentIntentConfirmParams.PaymentMethodData.SepaDebit( - this.extraParams, this.iban); - } + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.SepaDebit#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Type of extra charge. */ + public Builder setType( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.SepaDebit#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("gift_shop") + GIFT_SHOP("gift_shop"), - /** Required. IBAN of the bank account. */ - public Builder setIban(String iban) { - this.iban = iban; - return this; - } - } - } + @SerializedName("laundry") + LAUNDRY("laundry"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Shopeepay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("mini_bar") + MINI_BAR("mini_bar"), - private Shopeepay(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("other") + OTHER("other"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("phone") + PHONE("phone"), - public static class Builder { - private Map extraParams; + @SerializedName("restaurant") + RESTAURANT("restaurant"); - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Shopeepay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Shopeepay(this.extraParams); - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add a key/value pair to `extraParams` map. 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.Shopeepay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + Type(String value) { + this.value = value; + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. 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.Shopeepay#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 + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Sofort { - /** - * Required. Two-letter ISO code representing the country the bank account is - * located in. - */ - @SerializedName("country") - Country country; + /** Indicates whether the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 details. */ + @SerializedName("taxes") + List taxes; - private Sofort(Country country, Map extraParams) { - this.country = country; - this.extraParams = extraParams; - } + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - public static Builder builder() { - return new Builder(); - } + public static Builder builder() { + return new Builder(); + } - public static class Builder { - private Country country; + public static class Builder { + private Map extraParams; - private Map extraParams; + private Boolean taxExemptIndicator; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Sofort build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Sofort( - this.country, this.extraParams); - } + private List taxes; - /** - * Required. Two-letter ISO code representing the country the bank account - * is located in. - */ - public Builder setCountry( - PaymentIntentConfirmParams.PaymentMethodData.Sofort.Country country) { - this.country = country; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Sofort#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Add a key/value pair to `extraParams` map. 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.LodgingData.Total.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.PaymentMethodData.Sofort#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } + /** + * Add all map key/value pairs to `extraParams` map. 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.LodgingData.Total.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; + } - public enum Country implements ApiRequestParams.EnumParam { - @SerializedName("AT") - AT("AT"), + /** Indicates whether the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } - @SerializedName("BE") - BE("BE"), + /** + * Add an element to `taxes` 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.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - @SerializedName("DE") - DE("DE"), + /** + * Add all elements to `taxes` 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.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List + elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } - @SerializedName("ES") - ES("ES"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount in cents. */ + @SerializedName("amount") + Long amount; - @SerializedName("IT") - IT("IT"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("NL") - NL("NL"); + /** Tax rate. */ + @SerializedName("rate") + Long rate; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Type of tax applied. */ + @SerializedName("type") + String type; - Country(String value) { - this.value = value; + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + 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.LodgingData.Total.Tax.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.PaymentDetails.LodgingData.Total.Tax.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; + } + + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class StripeBalance { - /** The connected account ID whose Stripe balance to use as the source of payment. */ - @SerializedName("account") - String account; + 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 @@ -12864,18 +12894,31 @@ public static class StripeBalance { Map extraParams; /** - * The source_type - * of the balance + * Required. Name of the product on subscription. e.g. Apple Music + * Subscription */ - @SerializedName("source_type") - SourceType sourceType; + @SerializedName("name") + String name; - private StripeBalance( - String account, Map extraParams, SourceType sourceType) { - this.account = account; + /** 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.sourceType = sourceType; + this.name = name; + this.startsAt = startsAt; } public static Builder builder() { @@ -12883,29 +12926,64 @@ public static Builder builder() { } public static class Builder { - private String account; + private Affiliate affiliate; + + private Boolean autoRenewal; + + private BillingInterval billingInterval; + + private Long endsAt; private Map extraParams; - private SourceType sourceType; + private String name; + + private Long startsAt; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.StripeBalance build() { - return new PaymentIntentConfirmParams.PaymentMethodData.StripeBalance( - this.account, this.extraParams, this.sourceType); + public PaymentIntentConfirmParams.PaymentDetails.Subscription build() { + return new PaymentIntentConfirmParams.PaymentDetails.Subscription( + this.affiliate, + this.autoRenewal, + this.billingInterval, + this.endsAt, + this.extraParams, + this.name, + this.startsAt); } - /** The connected account ID whose Stripe balance to use as the source of payment. */ - public Builder setAccount(String account) { - this.account = account; + /** 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.PaymentMethodData.StripeBalance#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Subscription#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12918,8 +12996,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.StripeBalance#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.Subscription#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12930,1319 +13008,943 @@ public Builder putAllExtraParam(Map map) { } /** - * The source_type - * of the balance + * Required. Name of the product on subscription. e.g. Apple Music + * Subscription */ - public Builder setSourceType( - PaymentIntentConfirmParams.PaymentMethodData.StripeBalance.SourceType sourceType) { - this.sourceType = sourceType; + public Builder setName(String name) { + this.name = name; return this; } - } - public enum SourceType implements ApiRequestParams.EnumParam { - @SerializedName("bank_account") - BANK_ACCOUNT("bank_account"), + /** Subscription start time. Measured in seconds since the Unix epoch. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + } - @SerializedName("card") - CARD("card"), + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - @SerializedName("fpx") - FPX("fpx"); + /** Required. The name of the affiliate that originated the purchase. */ + @SerializedName("name") + String name; - @Getter(onMethod_ = {@Override}) - private final String value; + private Affiliate(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - SourceType(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Swish { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Map extraParams; - private Swish(Map extraParams) { - this.extraParams = extraParams; - } + private String name; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate build() { + return new PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate( + this.extraParams, this.name); + } - public static class Builder { - private Map 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.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Swish build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Swish(this.extraParams); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * 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 + @EqualsAndHashCode(callSuper = false) + public static class BillingInterval { /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Swish#extraParams} for the - * field documentation. + * 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 putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("count") + Long count; /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Swish#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + @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; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Twint { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - private Twint(Map extraParams) { - this.extraParams = extraParams; - } + public static class Builder { + private Long count; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + private Interval interval; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Twint build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Twint(this.extraParams); - } + /** 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); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Twint#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * 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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Twint#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. 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; } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class UsBankAccount { - /** Account holder type: individual or company. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - /** Account number of the bank account. */ - @SerializedName("account_number") - String accountNumber; + @SerializedName("month") + MONTH("month"), - /** Account type: checkings or savings. Defaults to checking if omitted. */ - @SerializedName("account_type") - AccountType accountType; + @SerializedName("week") + WEEK("week"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("year") + YEAR("year"); - /** The ID of a Financial Connections Account to use as a payment method. */ - @SerializedName("financial_connections_account") - String financialConnectionsAccount; + @Getter(onMethod_ = {@Override}) + private final String value; - /** Routing number of the bank account. */ - @SerializedName("routing_number") - String routingNumber; + Interval(String value) { + this.value = value; + } + } + } + } + } - private UsBankAccount( - AccountHolderType accountHolderType, - String accountNumber, - AccountType accountType, - Map extraParams, - String financialConnectionsAccount, - String routingNumber) { - this.accountHolderType = accountHolderType; - this.accountNumber = accountNumber; - this.accountType = accountType; - this.extraParams = extraParams; - this.financialConnectionsAccount = financialConnectionsAccount; - this.routingNumber = routingNumber; - } - - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - public static class Builder { - private AccountHolderType accountHolderType; + /** + * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm + * payment method. + */ + @SerializedName("affirm") + Affirm affirm; - private String accountNumber; + /** + * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the + * AfterpayClearpay payment method. + */ + @SerializedName("afterpay_clearpay") + AfterpayClearpay afterpayClearpay; - private AccountType accountType; + /** + * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay + * payment method. + */ + @SerializedName("alipay") + Alipay alipay; - private Map extraParams; + /** + * 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; - private String financialConnectionsAccount; + /** + * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + */ + @SerializedName("alma") + Alma alma; - private String routingNumber; + /** + * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment + * method. + */ + @SerializedName("amazon_pay") + AmazonPay amazonPay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount build() { - return new PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount( - this.accountHolderType, - this.accountNumber, - this.accountType, - this.extraParams, - this.financialConnectionsAccount, - this.routingNumber); - } + /** + * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank + * account. + */ + @SerializedName("au_becs_debit") + AuBecsDebit auBecsDebit; - /** Account holder type: individual or company. */ - public Builder setAccountHolderType( - PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount.AccountHolderType - accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + /** + * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs + * Direct Debit bank account. + */ + @SerializedName("bacs_debit") + BacsDebit bacsDebit; - /** Account number of the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** + * If this is a {@code bancontact} PaymentMethod, this hash contains details about the + * Bancontact payment method. + */ + @SerializedName("bancontact") + Bancontact bancontact; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - public Builder setAccountType( - PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount.AccountType accountType) { - this.accountType = accountType; - return this; - } + /** + * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie + * payment method. + */ + @SerializedName("billie") + Billie billie; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Billing information associated with the PaymentMethod that may be used or required by + * particular types of payment methods. + */ + @SerializedName("billing_details") + BillingDetails billingDetails; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment + * method. + */ + @SerializedName("blik") + Blik blik; - /** The ID of a Financial Connections Account to use as a payment method. */ - public Builder setFinancialConnectionsAccount(String financialConnectionsAccount) { - this.financialConnectionsAccount = financialConnectionsAccount; - return this; - } + /** + * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto + * payment method. + */ + @SerializedName("boleto") + Boleto boleto; - /** Routing number of the bank account. */ - public Builder setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - return this; - } - } + /** + * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay + * payment method. + */ + @SerializedName("cashapp") + Cashapp cashapp; - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; - @SerializedName("individual") - INDIVIDUAL("individual"); + /** + * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the + * CustomerBalance payment method. + */ + @SerializedName("customer_balance") + CustomerBalance customerBalance; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment + * method. + */ + @SerializedName("eps") + Eps eps; - AccountHolderType(String value) { - this.value = value; - } - } + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public enum AccountType implements ApiRequestParams.EnumParam { - @SerializedName("checking") - CHECKING("checking"), + /** + * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment + * method. + */ + @SerializedName("fpx") + Fpx fpx; - @SerializedName("savings") - SAVINGS("savings"); + /** + * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay + * payment method. + */ + @SerializedName("giropay") + Giropay giropay; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + */ + @SerializedName("gopay") + Gopay gopay; - AccountType(String value) { - this.value = value; - } - } - } + /** + * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay + * payment method. + */ + @SerializedName("grabpay") + Grabpay grabpay; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class WechatPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; - private WechatPay(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment + * method. + */ + @SerializedName("ideal") + Ideal ideal; - public static Builder builder() { - return new Builder(); - } + /** + * If this is an {@code interac_present} PaymentMethod, this hash contains details about the + * Interac Present payment method. + */ + @SerializedName("interac_present") + InteracPresent interacPresent; - public static class Builder { - private Map extraParams; + /** + * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao Pay + * payment method. + */ + @SerializedName("kakao_pay") + KakaoPay kakaoPay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.WechatPay build() { - return new PaymentIntentConfirmParams.PaymentMethodData.WechatPay(this.extraParams); - } + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method. + */ + @SerializedName("klarna") + Klarna klarna; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.WechatPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini + * payment method. + */ + @SerializedName("konbini") + Konbini konbini; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.WechatPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + /** + * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean Card + * payment method. + */ + @SerializedName("kr_card") + KrCard krCard; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Zip { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment + * method. + */ + @SerializedName("link") + Link link; - private Zip(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; - public static Builder builder() { - return new Builder(); - } + /** + * 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; - public static class Builder { - private Map extraParams; + /** + * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the MobilePay + * payment method. + */ + @SerializedName("mobilepay") + Mobilepay mobilepay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodData.Zip build() { - return new PaymentIntentConfirmParams.PaymentMethodData.Zip(this.extraParams); - } + /** + * If this is a {@code multibanco} PaymentMethod, this hash contains details about the + * Multibanco payment method. + */ + @SerializedName("multibanco") + Multibanco multibanco; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Zip#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver Pay + * payment method. + */ + @SerializedName("naver_pay") + NaverPay naverPay; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Zip#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + /** + * If this is an nz_bank_account PaymentMethod, this hash contains details about the + * nz_bank_account payment method. + */ + @SerializedName("nz_bank_account") + NzBankAccount nzBankAccount; - public enum AllowRedisplay implements ApiRequestParams.EnumParam { - @SerializedName("always") - ALWAYS("always"), + /** + * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment + * method. + */ + @SerializedName("oxxo") + Oxxo oxxo; - @SerializedName("limited") - LIMITED("limited"), + /** + * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment + * method. + */ + @SerializedName("p24") + P24 p24; - @SerializedName("unspecified") - UNSPECIFIED("unspecified"); + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment + * method. + */ + @SerializedName("payco") + Payco payco; - AllowRedisplay(String value) { - this.value = value; - } - } + /** + * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow + * payment method. + */ + @SerializedName("paynow") + Paynow paynow; - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("acss_debit") - ACSS_DEBIT("acss_debit"), + /** + * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal + * payment method. + */ + @SerializedName("paypal") + Paypal paypal; - @SerializedName("affirm") - AFFIRM("affirm"), + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; - @SerializedName("afterpay_clearpay") - AFTERPAY_CLEARPAY("afterpay_clearpay"), + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; - @SerializedName("alipay") - ALIPAY("alipay"), - - @SerializedName("alma") - ALMA("alma"), - - @SerializedName("amazon_pay") - AMAZON_PAY("amazon_pay"), - - @SerializedName("au_becs_debit") - AU_BECS_DEBIT("au_becs_debit"), - - @SerializedName("bacs_debit") - BACS_DEBIT("bacs_debit"), - - @SerializedName("bancontact") - BANCONTACT("bancontact"), - - @SerializedName("billie") - BILLIE("billie"), - - @SerializedName("blik") - BLIK("blik"), - - @SerializedName("boleto") - BOLETO("boleto"), - - @SerializedName("cashapp") - CASHAPP("cashapp"), - - @SerializedName("crypto") - CRYPTO("crypto"), - - @SerializedName("customer_balance") - CUSTOMER_BALANCE("customer_balance"), - - @SerializedName("eps") - EPS("eps"), - - @SerializedName("fpx") - FPX("fpx"), - - @SerializedName("giropay") - GIROPAY("giropay"), - - @SerializedName("gopay") - GOPAY("gopay"), - - @SerializedName("grabpay") - GRABPAY("grabpay"), - - @SerializedName("id_bank_transfer") - ID_BANK_TRANSFER("id_bank_transfer"), - - @SerializedName("ideal") - IDEAL("ideal"), - - @SerializedName("kakao_pay") - KAKAO_PAY("kakao_pay"), - - @SerializedName("klarna") - KLARNA("klarna"), - - @SerializedName("konbini") - KONBINI("konbini"), - - @SerializedName("kr_card") - KR_CARD("kr_card"), - - @SerializedName("link") - LINK("link"), - - @SerializedName("mb_way") - MB_WAY("mb_way"), - - @SerializedName("mobilepay") - MOBILEPAY("mobilepay"), - - @SerializedName("multibanco") - MULTIBANCO("multibanco"), - - @SerializedName("naver_pay") - NAVER_PAY("naver_pay"), - - @SerializedName("nz_bank_account") - NZ_BANK_ACCOUNT("nz_bank_account"), - - @SerializedName("oxxo") - OXXO("oxxo"), - - @SerializedName("p24") - P24("p24"), - - @SerializedName("pay_by_bank") - PAY_BY_BANK("pay_by_bank"), - - @SerializedName("payco") - PAYCO("payco"), - - @SerializedName("paynow") - PAYNOW("paynow"), - - @SerializedName("paypal") - PAYPAL("paypal"), - - @SerializedName("paypay") - PAYPAY("paypay"), - - @SerializedName("payto") - PAYTO("payto"), - - @SerializedName("pix") - PIX("pix"), - - @SerializedName("promptpay") - PROMPTPAY("promptpay"), - - @SerializedName("qris") - QRIS("qris"), - - @SerializedName("rechnung") - RECHNUNG("rechnung"), - - @SerializedName("revolut_pay") - REVOLUT_PAY("revolut_pay"), - - @SerializedName("samsung_pay") - SAMSUNG_PAY("samsung_pay"), - - @SerializedName("satispay") - SATISPAY("satispay"), - - @SerializedName("sepa_debit") - SEPA_DEBIT("sepa_debit"), - - @SerializedName("shopeepay") - SHOPEEPAY("shopeepay"), - - @SerializedName("sofort") - SOFORT("sofort"), - - @SerializedName("stripe_balance") - STRIPE_BALANCE("stripe_balance"), - - @SerializedName("swish") - SWISH("swish"), - - @SerializedName("twint") - TWINT("twint"), - - @SerializedName("us_bank_account") - US_BANK_ACCOUNT("us_bank_account"), - - @SerializedName("wechat_pay") - WECHAT_PAY("wechat_pay"), - - @SerializedName("zip") - ZIP("zip"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - Type(String value) { - this.value = value; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PaymentMethodOptions { /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the ACSS - * Debit payment method options. + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. */ - @SerializedName("acss_debit") - Object acssDebit; + @SerializedName("pix") + Pix pix; /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. + * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay + * payment method. */ - @SerializedName("affirm") - Object affirm; + @SerializedName("promptpay") + Promptpay promptpay; /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. + * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment + * method. */ - @SerializedName("afterpay_clearpay") - Object afterpayClearpay; + @SerializedName("qris") + Qris qris; /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. + * Options to configure Radar. See Radar + * Session for more information. */ - @SerializedName("alipay") - Object alipay; + @SerializedName("radar_options") + RadarOptions radarOptions; /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. + * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung + * payment method. */ - @SerializedName("alma") - Object alma; + @SerializedName("rechnung") + Rechnung rechnung; /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. + * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the Revolut + * Pay payment method. */ - @SerializedName("amazon_pay") - Object amazonPay; + @SerializedName("revolut_pay") + RevolutPay revolutPay; /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the AU - * BECS Direct Debit payment method options. + * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the + * SamsungPay payment method. */ - @SerializedName("au_becs_debit") - Object auBecsDebit; + @SerializedName("samsung_pay") + SamsungPay samsungPay; /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the BACS - * Debit payment method options. + * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay + * payment method. */ - @SerializedName("bacs_debit") - Object bacsDebit; + @SerializedName("satispay") + Satispay satispay; /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. + * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA + * debit bank account. */ - @SerializedName("bancontact") - Object bancontact; + @SerializedName("sepa_debit") + SepaDebit sepaDebit; /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. + * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment + * method. */ - @SerializedName("billie") - Object billie; + @SerializedName("shopeepay") + Shopeepay shopeepay; /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. + * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT + * payment method. */ - @SerializedName("blik") - Object blik; - - /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. - */ - @SerializedName("boleto") - Object boleto; + @SerializedName("sofort") + Sofort sofort; - /** Configuration for any card payments attempted on this PaymentIntent. */ - @SerializedName("card") - Object card; + /** This hash contains details about the Stripe balance payment method. */ + @SerializedName("stripe_balance") + StripeBalance stripeBalance; /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. + * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment + * method. */ - @SerializedName("card_present") - Object cardPresent; + @SerializedName("swish") + Swish swish; /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App - * Pay payment method options. + * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. */ - @SerializedName("cashapp") - Object cashapp; + @SerializedName("twint") + Twint twint; /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. + * 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("crypto") - Object crypto; + @SerializedName("type") + Type type; /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the - * customer balance payment method options. + * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US + * bank account payment method. */ - @SerializedName("customer_balance") - Object customerBalance; + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS payment - * method options. + * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the + * wechat_pay payment method. */ - @SerializedName("eps") - Object eps; + @SerializedName("wechat_pay") + WechatPay wechatPay; /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment + * method. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("zip") + Zip zip; - /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment - * method options. - */ - @SerializedName("fpx") - Object fpx; + private PaymentMethodData( + AcssDebit acssDebit, + Affirm affirm, + AfterpayClearpay afterpayClearpay, + Alipay alipay, + AllowRedisplay allowRedisplay, + Alma alma, + AmazonPay amazonPay, + AuBecsDebit auBecsDebit, + BacsDebit bacsDebit, + Bancontact bancontact, + Billie billie, + BillingDetails billingDetails, + Blik blik, + Boleto boleto, + Cashapp cashapp, + Crypto crypto, + CustomerBalance customerBalance, + Eps eps, + Map extraParams, + Fpx fpx, + Giropay giropay, + Gopay gopay, + Grabpay grabpay, + IdBankTransfer idBankTransfer, + Ideal ideal, + InteracPresent interacPresent, + KakaoPay kakaoPay, + Klarna klarna, + Konbini konbini, + KrCard krCard, + Link link, + MbWay mbWay, + Map metadata, + Mobilepay mobilepay, + Multibanco multibanco, + NaverPay naverPay, + NzBankAccount nzBankAccount, + Oxxo oxxo, + P24 p24, + PayByBank payByBank, + Payco payco, + Paynow paynow, + Paypal paypal, + Paypay paypay, + Payto payto, + Pix pix, + Promptpay promptpay, + Qris qris, + RadarOptions radarOptions, + Rechnung rechnung, + RevolutPay revolutPay, + SamsungPay samsungPay, + Satispay satispay, + SepaDebit sepaDebit, + Shopeepay shopeepay, + Sofort sofort, + StripeBalance stripeBalance, + 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.alma = alma; + this.amazonPay = amazonPay; + this.auBecsDebit = auBecsDebit; + this.bacsDebit = bacsDebit; + this.bancontact = bancontact; + this.billie = billie; + this.billingDetails = billingDetails; + this.blik = blik; + this.boleto = boleto; + this.cashapp = cashapp; + this.crypto = crypto; + this.customerBalance = customerBalance; + this.eps = eps; + this.extraParams = extraParams; + this.fpx = fpx; + this.giropay = giropay; + this.gopay = gopay; + this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; + this.ideal = ideal; + this.interacPresent = interacPresent; + this.kakaoPay = kakaoPay; + this.klarna = klarna; + this.konbini = konbini; + this.krCard = krCard; + this.link = link; + this.mbWay = mbWay; + this.metadata = metadata; + this.mobilepay = mobilepay; + this.multibanco = multibanco; + this.naverPay = naverPay; + this.nzBankAccount = nzBankAccount; + this.oxxo = oxxo; + this.p24 = p24; + this.payByBank = payByBank; + this.payco = payco; + this.paynow = paynow; + this.paypal = paypal; + this.paypay = paypay; + this.payto = payto; + this.pix = pix; + this.promptpay = promptpay; + this.qris = qris; + this.radarOptions = radarOptions; + this.rechnung = rechnung; + this.revolutPay = revolutPay; + this.samsungPay = samsungPay; + this.satispay = satispay; + this.sepaDebit = sepaDebit; + this.shopeepay = shopeepay; + this.sofort = sofort; + this.stripeBalance = stripeBalance; + this.swish = swish; + this.twint = twint; + this.type = type; + this.usBankAccount = usBankAccount; + this.wechatPay = wechatPay; + this.zip = zip; + } - /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay - * payment method options. - */ - @SerializedName("giropay") - Object giropay; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. - */ - @SerializedName("gopay") - Object gopay; + public static class Builder { + private AcssDebit acssDebit; - /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay - * payment method options. - */ - @SerializedName("grabpay") - Object grabpay; + private Affirm affirm; - /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the - * Indonesia Bank Transfer payment method options. - */ - @SerializedName("id_bank_transfer") - Object idBankTransfer; + private AfterpayClearpay afterpayClearpay; - /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. - */ - @SerializedName("ideal") - Object ideal; + private Alipay alipay; - /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. - */ - @SerializedName("interac_present") - Object interacPresent; + private AllowRedisplay allowRedisplay; - /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the Kakao - * Pay payment method options. - */ - @SerializedName("kakao_pay") - Object kakaoPay; + private Alma alma; - /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. - */ - @SerializedName("klarna") - Object klarna; + private AmazonPay amazonPay; - /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini - * payment method options. - */ - @SerializedName("konbini") - Object konbini; + private AuBecsDebit auBecsDebit; - /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR Card - * payment method options. - */ - @SerializedName("kr_card") - Object krCard; + private BacsDebit bacsDebit; - /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - @SerializedName("link") - Object link; + private Bancontact bancontact; - /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. - */ - @SerializedName("mb_way") - Object mbWay; + private Billie billie; - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - @SerializedName("mobilepay") - Object mobilepay; + private BillingDetails billingDetails; - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - @SerializedName("multibanco") - Object multibanco; + private Blik blik; - /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the Naver - * Pay payment method options. - */ - @SerializedName("naver_pay") - Object naverPay; + private Boleto boleto; - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about the - * NZ BECS Direct Debit payment method options. - */ - @SerializedName("nz_bank_account") - Object nzBankAccount; + private Cashapp cashapp; - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - @SerializedName("oxxo") - Object oxxo; + private Crypto crypto; - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - @SerializedName("p24") - Object p24; + private CustomerBalance customerBalance; - /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. - */ - @SerializedName("pay_by_bank") - Object payByBank; + private Eps eps; - /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - @SerializedName("payco") - Object payco; + private Map extraParams; - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - @SerializedName("paynow") - Object paynow; + private Fpx fpx; - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - @SerializedName("paypal") - Object paypal; + private Giropay giropay; - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - @SerializedName("paypay") - Object paypay; + private Gopay gopay; - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - @SerializedName("payto") - Object payto; + private Grabpay grabpay; - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment - * method options. - */ - @SerializedName("pix") - Object pix; + private IdBankTransfer idBankTransfer; - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - @SerializedName("promptpay") - Object promptpay; + private Ideal ideal; - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - @SerializedName("qris") - Object qris; + private InteracPresent interacPresent; - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - @SerializedName("rechnung") - Object rechnung; + private KakaoPay kakaoPay; - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - @SerializedName("revolut_pay") - Object revolutPay; + private Klarna klarna; - /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. - */ - @SerializedName("samsung_pay") - Object samsungPay; + private Konbini konbini; - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - @SerializedName("satispay") - Object satispay; + private KrCard krCard; - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the SEPA - * Debit payment method options. - */ - @SerializedName("sepa_debit") - Object sepaDebit; + private Link link; - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - @SerializedName("shopeepay") - Object shopeepay; + private MbWay mbWay; - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - @SerializedName("sofort") - Object sofort; + private Map metadata; - /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. - */ - @SerializedName("stripe_balance") - Object stripeBalance; + private Mobilepay mobilepay; - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - @SerializedName("swish") - Object swish; + private Multibanco multibanco; - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - @SerializedName("twint") - Object twint; + private NaverPay naverPay; - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the - * US bank account payment method options. - */ - @SerializedName("us_bank_account") - Object usBankAccount; + private NzBankAccount nzBankAccount; - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - @SerializedName("wechat_pay") - Object wechatPay; + private Oxxo oxxo; - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment - * method options. - */ - @SerializedName("zip") - Object zip; + private P24 p24; - private PaymentMethodOptions( - Object acssDebit, - Object affirm, - Object afterpayClearpay, - Object alipay, - Object alma, - Object amazonPay, - Object auBecsDebit, - Object bacsDebit, - Object bancontact, - Object billie, - Object blik, - Object boleto, - Object card, - Object cardPresent, - Object cashapp, - Object crypto, - Object customerBalance, - Object eps, - Map extraParams, - Object fpx, - Object giropay, - Object gopay, - Object grabpay, - Object idBankTransfer, - Object ideal, - Object interacPresent, - Object kakaoPay, - Object klarna, - Object konbini, - Object krCard, - Object link, - Object mbWay, - Object mobilepay, - Object multibanco, - Object naverPay, - Object nzBankAccount, - Object oxxo, - Object p24, - Object payByBank, - Object payco, - Object paynow, - Object paypal, - Object paypay, - Object payto, - Object pix, - Object promptpay, - Object qris, - Object rechnung, - Object revolutPay, - Object samsungPay, - Object satispay, - Object sepaDebit, - Object shopeepay, - Object sofort, - Object stripeBalance, - Object swish, - Object twint, - Object usBankAccount, - Object wechatPay, - Object zip) { - this.acssDebit = acssDebit; - this.affirm = affirm; - this.afterpayClearpay = afterpayClearpay; - this.alipay = alipay; - this.alma = alma; - this.amazonPay = amazonPay; - this.auBecsDebit = auBecsDebit; - this.bacsDebit = bacsDebit; - this.bancontact = bancontact; - this.billie = billie; - this.blik = blik; - this.boleto = boleto; - this.card = card; - this.cardPresent = cardPresent; - this.cashapp = cashapp; - this.crypto = crypto; - this.customerBalance = customerBalance; - this.eps = eps; - this.extraParams = extraParams; - this.fpx = fpx; - this.giropay = giropay; - this.gopay = gopay; - this.grabpay = grabpay; - this.idBankTransfer = idBankTransfer; - this.ideal = ideal; - this.interacPresent = interacPresent; - this.kakaoPay = kakaoPay; - this.klarna = klarna; - this.konbini = konbini; - this.krCard = krCard; - this.link = link; - this.mbWay = mbWay; - this.mobilepay = mobilepay; - this.multibanco = multibanco; - this.naverPay = naverPay; - this.nzBankAccount = nzBankAccount; - this.oxxo = oxxo; - this.p24 = p24; - this.payByBank = payByBank; - this.payco = payco; - this.paynow = paynow; - this.paypal = paypal; - this.paypay = paypay; - this.payto = payto; - this.pix = pix; - this.promptpay = promptpay; - this.qris = qris; - this.rechnung = rechnung; - this.revolutPay = revolutPay; - this.samsungPay = samsungPay; - this.satispay = satispay; - this.sepaDebit = sepaDebit; - this.shopeepay = shopeepay; - this.sofort = sofort; - this.stripeBalance = stripeBalance; - this.swish = swish; - this.twint = twint; - this.usBankAccount = usBankAccount; - this.wechatPay = wechatPay; - this.zip = zip; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object acssDebit; - - private Object affirm; - - private Object afterpayClearpay; - - private Object alipay; - - private Object alma; - - private Object amazonPay; - - private Object auBecsDebit; - - private Object bacsDebit; - - private Object bancontact; - - private Object billie; - - private Object blik; - - private Object boleto; - - private Object card; - - private Object cardPresent; - - private Object cashapp; - - private Object crypto; - - private Object customerBalance; - - private Object eps; - - private Map extraParams; - - private Object fpx; - - private Object giropay; - - private Object gopay; - - private Object grabpay; - - private Object idBankTransfer; - - private Object ideal; - - private Object interacPresent; - - private Object kakaoPay; - - private Object klarna; - - private Object konbini; - - private Object krCard; - - private Object link; - - private Object mbWay; - - private Object mobilepay; - - private Object multibanco; - - private Object naverPay; - - private Object nzBankAccount; - - private Object oxxo; + private PayByBank payByBank; - private Object p24; + private Payco payco; - private Object payByBank; + private Paynow paynow; - private Object payco; + private Paypal paypal; - private Object paynow; + private Paypay paypay; - private Object paypal; + private Payto payto; - private Object paypay; + private Pix pix; - private Object payto; + private Promptpay promptpay; - private Object pix; + private Qris qris; - private Object promptpay; + private RadarOptions radarOptions; - private Object qris; + private Rechnung rechnung; - private Object rechnung; + private RevolutPay revolutPay; - private Object revolutPay; + private SamsungPay samsungPay; - private Object samsungPay; + private Satispay satispay; - private Object satispay; + private SepaDebit sepaDebit; - private Object sepaDebit; + private Shopeepay shopeepay; - private Object shopeepay; + private Sofort sofort; - private Object sofort; + private StripeBalance stripeBalance; - private Object stripeBalance; + private Swish swish; - private Object swish; + private Twint twint; - private Object twint; + private Type type; - private Object usBankAccount; + private UsBankAccount usBankAccount; - private Object wechatPay; + private WechatPay wechatPay; - private Object zip; + private Zip zip; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions( + public PaymentIntentConfirmParams.PaymentMethodData build() { + return new PaymentIntentConfirmParams.PaymentMethodData( this.acssDebit, this.affirm, this.afterpayClearpay, this.alipay, + this.allowRedisplay, this.alma, this.amazonPay, this.auBecsDebit, this.bacsDebit, this.bancontact, this.billie, + this.billingDetails, this.blik, this.boleto, - this.card, - this.cardPresent, this.cashapp, this.crypto, this.customerBalance, @@ -14261,6 +13963,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.krCard, this.link, this.mbWay, + this.metadata, this.mobilepay, this.multibanco, this.naverPay, @@ -14276,6 +13979,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.pix, this.promptpay, this.qris, + this.radarOptions, this.rechnung, this.revolutPay, this.samsungPay, @@ -14286,1124 +13990,1126 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.stripeBalance, this.swish, this.twint, + this.type, this.usBankAccount, this.wechatPay, this.zip); } /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the - * ACSS Debit payment method options. + * If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS + * Debit payment method. */ public Builder setAcssDebit( - PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit acssDebit) { + PaymentIntentConfirmParams.PaymentMethodData.AcssDebit acssDebit) { this.acssDebit = acssDebit; return this; } /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the - * ACSS Debit payment method options. + * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm + * payment method. */ - public Builder setAcssDebit(EmptyParam acssDebit) { - this.acssDebit = acssDebit; + public Builder setAffirm(PaymentIntentConfirmParams.PaymentMethodData.Affirm affirm) { + this.affirm = affirm; return this; } /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. + * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the + * AfterpayClearpay payment method. */ - public Builder setAffirm(PaymentIntentConfirmParams.PaymentMethodOptions.Affirm affirm) { - this.affirm = affirm; + public Builder setAfterpayClearpay( + PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; return this; } /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. + * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay + * payment method. */ - public Builder setAffirm(EmptyParam affirm) { - this.affirm = affirm; + public Builder setAlipay(PaymentIntentConfirmParams.PaymentMethodData.Alipay alipay) { + this.alipay = alipay; return this; } /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. + * 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 setAfterpayClearpay( - PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; + public Builder setAllowRedisplay( + PaymentIntentConfirmParams.PaymentMethodData.AllowRedisplay allowRedisplay) { + this.allowRedisplay = allowRedisplay; return this; } /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. + * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. */ - public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; + public Builder setAlma(PaymentIntentConfirmParams.PaymentMethodData.Alma alma) { + this.alma = alma; return this; } /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. + * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay + * payment method. */ - public Builder setAlipay(PaymentIntentConfirmParams.PaymentMethodOptions.Alipay alipay) { - this.alipay = alipay; + public Builder setAmazonPay( + PaymentIntentConfirmParams.PaymentMethodData.AmazonPay amazonPay) { + this.amazonPay = amazonPay; return this; } /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. + * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the + * bank account. */ - public Builder setAlipay(EmptyParam alipay) { - this.alipay = alipay; + public Builder setAuBecsDebit( + PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit auBecsDebit) { + this.auBecsDebit = auBecsDebit; return this; } /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. + * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs + * Direct Debit bank account. */ - public Builder setAlma(PaymentIntentConfirmParams.PaymentMethodOptions.Alma alma) { - this.alma = alma; + public Builder setBacsDebit( + PaymentIntentConfirmParams.PaymentMethodData.BacsDebit bacsDebit) { + this.bacsDebit = bacsDebit; return this; } /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. + * If this is a {@code bancontact} PaymentMethod, this hash contains details about the + * Bancontact payment method. */ - public Builder setAlma(EmptyParam alma) { - this.alma = alma; + public Builder setBancontact( + PaymentIntentConfirmParams.PaymentMethodData.Bancontact bancontact) { + this.bancontact = bancontact; return this; } /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. + * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie + * payment method. */ - public Builder setAmazonPay( - PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay amazonPay) { - this.amazonPay = amazonPay; + public Builder setBillie(PaymentIntentConfirmParams.PaymentMethodData.Billie billie) { + this.billie = billie; return this; } /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. + * Billing information associated with the PaymentMethod that may be used or required by + * particular types of payment methods. */ - public Builder setAmazonPay(EmptyParam amazonPay) { - this.amazonPay = amazonPay; + public Builder setBillingDetails( + PaymentIntentConfirmParams.PaymentMethodData.BillingDetails billingDetails) { + this.billingDetails = billingDetails; return this; } /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the - * AU BECS Direct Debit payment method options. + * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment + * method. */ - public Builder setAuBecsDebit( - PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) { - this.auBecsDebit = auBecsDebit; + public Builder setBlik(PaymentIntentConfirmParams.PaymentMethodData.Blik blik) { + this.blik = blik; return this; } /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the - * AU BECS Direct Debit payment method options. + * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto + * payment method. */ - public Builder setAuBecsDebit(EmptyParam auBecsDebit) { - this.auBecsDebit = auBecsDebit; + public Builder setBoleto(PaymentIntentConfirmParams.PaymentMethodData.Boleto boleto) { + this.boleto = boleto; return this; } /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the - * BACS Debit payment method options. + * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App + * Pay payment method. */ - public Builder setBacsDebit( - PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit bacsDebit) { - this.bacsDebit = bacsDebit; + public Builder setCashapp(PaymentIntentConfirmParams.PaymentMethodData.Cashapp cashapp) { + this.cashapp = cashapp; return this; } /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the - * BACS Debit payment method options. + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. */ - public Builder setBacsDebit(EmptyParam bacsDebit) { - this.bacsDebit = bacsDebit; + public Builder setCrypto(PaymentIntentConfirmParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; return this; } /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. + * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the + * CustomerBalance payment method. */ - public Builder setBancontact( - PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact bancontact) { - this.bancontact = bancontact; + public Builder setCustomerBalance( + PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance customerBalance) { + this.customerBalance = customerBalance; return this; } /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. + * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment + * method. */ - public Builder setBancontact(EmptyParam bancontact) { - this.bancontact = bancontact; + public Builder setEps(PaymentIntentConfirmParams.PaymentMethodData.Eps eps) { + this.eps = eps; return this; } /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. + * Add a key/value pair to `extraParams` map. 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 setBillie(PaymentIntentConfirmParams.PaymentMethodOptions.Billie billie) { - this.billie = billie; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. + * Add all map key/value pairs to `extraParams` map. 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 setBillie(EmptyParam billie) { - this.billie = billie; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. + * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment + * method. */ - public Builder setBlik(PaymentIntentConfirmParams.PaymentMethodOptions.Blik blik) { - this.blik = blik; + public Builder setFpx(PaymentIntentConfirmParams.PaymentMethodData.Fpx fpx) { + this.fpx = fpx; return this; } /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. + * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay + * payment method. */ - public Builder setBlik(EmptyParam blik) { - this.blik = blik; + public Builder setGiropay(PaymentIntentConfirmParams.PaymentMethodData.Giropay giropay) { + this.giropay = giropay; return this; } /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. + * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment + * method. */ - public Builder setBoleto(PaymentIntentConfirmParams.PaymentMethodOptions.Boleto boleto) { - this.boleto = boleto; + public Builder setGopay(PaymentIntentConfirmParams.PaymentMethodData.Gopay gopay) { + this.gopay = gopay; return this; } /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. + * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay + * payment method. */ - public Builder setBoleto(EmptyParam boleto) { - this.boleto = boleto; + public Builder setGrabpay(PaymentIntentConfirmParams.PaymentMethodData.Grabpay grabpay) { + this.grabpay = grabpay; return this; } - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(PaymentIntentConfirmParams.PaymentMethodOptions.Card card) { - this.card = card; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; return this; } - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(EmptyParam card) { - this.card = card; + /** + * 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 a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. + * If this is an {@code interac_present} PaymentMethod, this hash contains details about the + * Interac Present payment method. */ - public Builder setCardPresent( - PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent cardPresent) { - this.cardPresent = cardPresent; + public Builder setInteracPresent( + PaymentIntentConfirmParams.PaymentMethodData.InteracPresent interacPresent) { + this.interacPresent = interacPresent; return this; } /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. + * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao + * Pay payment method. */ - public Builder setCardPresent(EmptyParam cardPresent) { - this.cardPresent = cardPresent; + public Builder setKakaoPay(PaymentIntentConfirmParams.PaymentMethodData.KakaoPay kakaoPay) { + this.kakaoPay = kakaoPay; return this; } /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash - * App Pay payment method options. + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method. */ - public Builder setCashapp(PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp cashapp) { - this.cashapp = cashapp; + public Builder setKlarna(PaymentIntentConfirmParams.PaymentMethodData.Klarna klarna) { + this.klarna = klarna; return this; } /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash - * App Pay payment method options. + * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini + * payment method. */ - public Builder setCashapp(EmptyParam cashapp) { - this.cashapp = cashapp; + public Builder setKonbini(PaymentIntentConfirmParams.PaymentMethodData.Konbini konbini) { + this.konbini = konbini; return this; } /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. + * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean + * Card payment method. */ - public Builder setCrypto(PaymentIntentConfirmParams.PaymentMethodOptions.Crypto crypto) { - this.crypto = crypto; + public Builder setKrCard(PaymentIntentConfirmParams.PaymentMethodData.KrCard krCard) { + this.krCard = krCard; return this; } /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. + * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment + * method. */ - public Builder setCrypto(EmptyParam crypto) { - this.crypto = crypto; + public Builder setLink(PaymentIntentConfirmParams.PaymentMethodData.Link link) { + this.link = link; return this; } /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about - * the customer balance payment method options. + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. */ - public Builder setCustomerBalance( - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance customerBalance) { - this.customerBalance = customerBalance; + public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; return this; } /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about - * the customer balance payment method options. + * 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 setCustomerBalance(EmptyParam customerBalance) { - this.customerBalance = customerBalance; + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); return this; } /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS - * payment method options. + * 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 setEps(PaymentIntentConfirmParams.PaymentMethodOptions.Eps eps) { - this.eps = eps; + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); return this; } /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS - * payment method options. + * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the + * MobilePay payment method. */ - public Builder setEps(EmptyParam eps) { - this.eps = eps; + public Builder setMobilepay( + PaymentIntentConfirmParams.PaymentMethodData.Mobilepay mobilepay) { + this.mobilepay = mobilepay; return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions#extraParams} for the field documentation. + * If this is a {@code multibanco} PaymentMethod, this hash contains details about the + * Multibanco payment method. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setMultibanco( + PaymentIntentConfirmParams.PaymentMethodData.Multibanco multibanco) { + this.multibanco = multibanco; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentIntentConfirmParams.PaymentMethodOptions#extraParams} for the field - * documentation. + * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver + * Pay payment method. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setNaverPay(PaymentIntentConfirmParams.PaymentMethodData.NaverPay naverPay) { + this.naverPay = naverPay; return this; } /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX - * payment method options. + * If this is an nz_bank_account PaymentMethod, this hash contains details about the + * nz_bank_account payment method. */ - public Builder setFpx(PaymentIntentConfirmParams.PaymentMethodOptions.Fpx fpx) { - this.fpx = fpx; + public Builder setNzBankAccount( + PaymentIntentConfirmParams.PaymentMethodData.NzBankAccount nzBankAccount) { + this.nzBankAccount = nzBankAccount; return this; } /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX - * payment method options. + * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment + * method. */ - public Builder setFpx(EmptyParam fpx) { - this.fpx = fpx; + public Builder setOxxo(PaymentIntentConfirmParams.PaymentMethodData.Oxxo oxxo) { + this.oxxo = oxxo; return this; } /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the - * Giropay payment method options. + * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment + * method. */ - public Builder setGiropay(PaymentIntentConfirmParams.PaymentMethodOptions.Giropay giropay) { - this.giropay = giropay; + public Builder setP24(PaymentIntentConfirmParams.PaymentMethodData.P24 p24) { + this.p24 = p24; return this; } /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the - * Giropay payment method options. + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. */ - public Builder setGiropay(EmptyParam giropay) { - this.giropay = giropay; + public Builder setPayByBank( + PaymentIntentConfirmParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; return this; } /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. + * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO + * payment method. */ - public Builder setGopay(PaymentIntentConfirmParams.PaymentMethodOptions.Gopay gopay) { - this.gopay = gopay; + public Builder setPayco(PaymentIntentConfirmParams.PaymentMethodData.Payco payco) { + this.payco = payco; return this; } /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. + * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow + * payment method. */ - public Builder setGopay(EmptyParam gopay) { - this.gopay = gopay; + public Builder setPaynow(PaymentIntentConfirmParams.PaymentMethodData.Paynow paynow) { + this.paynow = paynow; return this; } /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the - * Grabpay payment method options. + * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal + * payment method. */ - public Builder setGrabpay(PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay grabpay) { - this.grabpay = grabpay; + public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodData.Paypal paypal) { + this.paypal = paypal; return this; } /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the - * Grabpay payment method options. + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. */ - public Builder setGrabpay(EmptyParam grabpay) { - this.grabpay = grabpay; + public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; return this; } /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about - * the Indonesia Bank Transfer payment method options. + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. */ - public Builder setIdBankTransfer( - PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { - this.idBankTransfer = idBankTransfer; + public Builder setPayto(PaymentIntentConfirmParams.PaymentMethodData.Payto payto) { + this.payto = payto; return this; } /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about - * the Indonesia Bank Transfer payment method options. + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. */ - public Builder setIdBankTransfer(EmptyParam idBankTransfer) { - this.idBankTransfer = idBankTransfer; + public Builder setPix(PaymentIntentConfirmParams.PaymentMethodData.Pix pix) { + this.pix = pix; return this; } /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. + * If this is a {@code promptpay} PaymentMethod, this hash contains details about the + * PromptPay payment method. */ - public Builder setIdeal(PaymentIntentConfirmParams.PaymentMethodOptions.Ideal ideal) { - this.ideal = ideal; + public Builder setPromptpay( + PaymentIntentConfirmParams.PaymentMethodData.Promptpay promptpay) { + this.promptpay = promptpay; return this; } /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. + * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment + * method. */ - public Builder setIdeal(EmptyParam ideal) { - this.ideal = ideal; + public Builder setQris(PaymentIntentConfirmParams.PaymentMethodData.Qris qris) { + this.qris = qris; return this; } /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about - * the Card Present payment method options. + * Options to configure Radar. See Radar + * Session for more information. */ - public Builder setInteracPresent( - PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent interacPresent) { - this.interacPresent = interacPresent; + public Builder setRadarOptions( + PaymentIntentConfirmParams.PaymentMethodData.RadarOptions radarOptions) { + this.radarOptions = radarOptions; return this; } /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about - * the Card Present payment method options. + * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung + * payment method. */ - public Builder setInteracPresent(EmptyParam interacPresent) { - this.interacPresent = interacPresent; + public Builder setRechnung(PaymentIntentConfirmParams.PaymentMethodData.Rechnung rechnung) { + this.rechnung = rechnung; return this; } /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the - * Kakao Pay payment method options. + * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the + * Revolut Pay payment method. */ - public Builder setKakaoPay( - PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay kakaoPay) { - this.kakaoPay = kakaoPay; + public Builder setRevolutPay( + PaymentIntentConfirmParams.PaymentMethodData.RevolutPay revolutPay) { + this.revolutPay = revolutPay; return this; } /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the - * Kakao Pay payment method options. + * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the + * SamsungPay payment method. */ - public Builder setKakaoPay(EmptyParam kakaoPay) { - this.kakaoPay = kakaoPay; + public Builder setSamsungPay( + PaymentIntentConfirmParams.PaymentMethodData.SamsungPay samsungPay) { + this.samsungPay = samsungPay; return this; } /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. + * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay + * payment method. */ - public Builder setKlarna(PaymentIntentConfirmParams.PaymentMethodOptions.Klarna klarna) { - this.klarna = klarna; + public Builder setSatispay(PaymentIntentConfirmParams.PaymentMethodData.Satispay satispay) { + this.satispay = satispay; return this; } /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. + * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA + * debit bank account. */ - public Builder setKlarna(EmptyParam klarna) { - this.klarna = klarna; + public Builder setSepaDebit( + PaymentIntentConfirmParams.PaymentMethodData.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; return this; } /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the - * Konbini payment method options. + * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay + * payment method. */ - public Builder setKonbini(PaymentIntentConfirmParams.PaymentMethodOptions.Konbini konbini) { - this.konbini = konbini; + public Builder setShopeepay( + PaymentIntentConfirmParams.PaymentMethodData.Shopeepay shopeepay) { + this.shopeepay = shopeepay; return this; } /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the - * Konbini payment method options. + * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT + * payment method. */ - public Builder setKonbini(EmptyParam konbini) { - this.konbini = konbini; + public Builder setSofort(PaymentIntentConfirmParams.PaymentMethodData.Sofort sofort) { + this.sofort = sofort; return this; } - /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR - * Card payment method options. - */ - public Builder setKrCard(PaymentIntentConfirmParams.PaymentMethodOptions.KrCard krCard) { - this.krCard = krCard; + /** This hash contains details about the Stripe balance payment method. */ + public Builder setStripeBalance( + PaymentIntentConfirmParams.PaymentMethodData.StripeBalance stripeBalance) { + this.stripeBalance = stripeBalance; return this; } /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR - * Card payment method options. + * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish + * payment method. */ - public Builder setKrCard(EmptyParam krCard) { - this.krCard = krCard; + public Builder setSwish(PaymentIntentConfirmParams.PaymentMethodData.Swish swish) { + this.swish = swish; return this; } /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. + * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment + * method. */ - public Builder setLink(PaymentIntentConfirmParams.PaymentMethodOptions.Link link) { - this.link = link; + public Builder setTwint(PaymentIntentConfirmParams.PaymentMethodData.Twint twint) { + this.twint = twint; return this; } /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. + * 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 setLink(EmptyParam link) { - this.link = link; + public Builder setType(PaymentIntentConfirmParams.PaymentMethodData.Type type) { + this.type = type; return this; } /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. + * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the + * US bank account payment method. */ - public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodOptions.MbWay mbWay) { - this.mbWay = mbWay; + public Builder setUsBankAccount( + PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount usBankAccount) { + this.usBankAccount = usBankAccount; return this; } /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. + * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the + * wechat_pay payment method. */ - public Builder setMbWay(EmptyParam mbWay) { - this.mbWay = mbWay; + public Builder setWechatPay( + PaymentIntentConfirmParams.PaymentMethodData.WechatPay wechatPay) { + this.wechatPay = wechatPay; return this; } /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. + * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment + * method. */ - public Builder setMobilepay( - PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay mobilepay) { - this.mobilepay = mobilepay; + public Builder setZip(PaymentIntentConfirmParams.PaymentMethodData.Zip zip) { + this.zip = zip; return this; } + } - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - public Builder setMobilepay(EmptyParam mobilepay) { - this.mobilepay = mobilepay; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit { + /** Required. Customer's bank account number. */ + @SerializedName("account_number") + String accountNumber; /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setMultibanco( - PaymentIntentConfirmParams.PaymentMethodOptions.Multibanco multibanco) { - this.multibanco = multibanco; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - public Builder setMultibanco(EmptyParam multibanco) { - this.multibanco = multibanco; - return this; - } + /** Required. Institution number of the customer's bank. */ + @SerializedName("institution_number") + String institutionNumber; - /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the - * Naver Pay payment method options. - */ - public Builder setNaverPay( - PaymentIntentConfirmParams.PaymentMethodOptions.NaverPay naverPay) { - this.naverPay = naverPay; - return this; - } + /** Required. Transit number of the customer's bank. */ + @SerializedName("transit_number") + String transitNumber; - /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the - * Naver Pay payment method options. - */ - public Builder setNaverPay(EmptyParam naverPay) { - this.naverPay = naverPay; - return this; + private AcssDebit( + String accountNumber, + Map extraParams, + String institutionNumber, + String transitNumber) { + this.accountNumber = accountNumber; + this.extraParams = extraParams; + this.institutionNumber = institutionNumber; + this.transitNumber = transitNumber; } - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about - * the NZ BECS Direct Debit payment method options. - */ - public Builder setNzBankAccount( - PaymentIntentConfirmParams.PaymentMethodOptions.NzBankAccount nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about - * the NZ BECS Direct Debit payment method options. - */ - public Builder setNzBankAccount(EmptyParam nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; - } + public static class Builder { + private String accountNumber; - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - public Builder setOxxo(PaymentIntentConfirmParams.PaymentMethodOptions.Oxxo oxxo) { - this.oxxo = oxxo; - return this; - } + private Map extraParams; - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - public Builder setOxxo(EmptyParam oxxo) { - this.oxxo = oxxo; - return this; - } + private String institutionNumber; - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - public Builder setP24(PaymentIntentConfirmParams.PaymentMethodOptions.P24 p24) { - this.p24 = p24; - return this; - } + private String transitNumber; - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - public Builder setP24(EmptyParam p24) { - this.p24 = p24; - return this; - } + /** 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); + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. - */ - public Builder setPayByBank( - PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank payByBank) { - this.payByBank = payByBank; - return this; - } + /** Required. Customer's bank account number. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. - */ - public Builder setPayByBank(EmptyParam payByBank) { - this.payByBank = payByBank; - 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; + } - /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - public Builder setPayco(PaymentIntentConfirmParams.PaymentMethodOptions.Payco payco) { - this.payco = payco; - return this; + /** + * Add all map key/value pairs to `extraParams` map. 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 + @EqualsAndHashCode(callSuper = false) + public static class Affirm { /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setPayco(EmptyParam payco) { - this.payco = payco; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Affirm(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - public Builder setPaynow(PaymentIntentConfirmParams.PaymentMethodOptions.Paynow paynow) { - this.paynow = paynow; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - public Builder setPaynow(EmptyParam paynow) { - this.paynow = paynow; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodOptions.Paypal paypal) { - this.paypal = paypal; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Affirm build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Affirm(this.extraParams); + } - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - public Builder setPaypal(EmptyParam paypal) { - this.paypal = paypal; - return this; - } + /** + * Add a key/value pair to `extraParams` map. 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; + } - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodOptions.Paypay paypay) { - this.paypay = paypay; - return this; + /** + * Add all map key/value pairs to `extraParams` map. 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 + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpay { /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setPaypay(EmptyParam paypay) { - this.paypay = paypay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - public Builder setPayto(PaymentIntentConfirmParams.PaymentMethodOptions.Payto payto) { - this.payto = payto; - return this; + private AfterpayClearpay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - public Builder setPayto(EmptyParam payto) { - this.payto = payto; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix - * payment method options. - */ - public Builder setPix(PaymentIntentConfirmParams.PaymentMethodOptions.Pix pix) { - this.pix = pix; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix - * payment method options. - */ - public Builder setPix(EmptyParam pix) { - this.pix = pix; - return this; + /** 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 + @EqualsAndHashCode(callSuper = false) + public static class Alipay { /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setPromptpay( - PaymentIntentConfirmParams.PaymentMethodOptions.Promptpay promptpay) { - this.promptpay = promptpay; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alipay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - public Builder setPromptpay(EmptyParam promptpay) { - this.promptpay = promptpay; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - public Builder setQris(PaymentIntentConfirmParams.PaymentMethodOptions.Qris qris) { - this.qris = qris; - return this; + 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 + @EqualsAndHashCode(callSuper = false) + public static class Alma { /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setQris(EmptyParam qris) { - this.qris = qris; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alma(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - public Builder setRechnung( - PaymentIntentConfirmParams.PaymentMethodOptions.Rechnung rechnung) { - this.rechnung = rechnung; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - public Builder setRechnung(EmptyParam rechnung) { - this.rechnung = rechnung; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - public Builder setRevolutPay( - PaymentIntentConfirmParams.PaymentMethodOptions.RevolutPay revolutPay) { - this.revolutPay = revolutPay; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Alma build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Alma(this.extraParams); + } - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - public Builder setRevolutPay(EmptyParam revolutPay) { - this.revolutPay = revolutPay; - return this; - } + /** + * Add a key/value pair to `extraParams` map. 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.Alma#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. - */ - public Builder setSamsungPay( - PaymentIntentConfirmParams.PaymentMethodOptions.SamsungPay samsungPay) { - this.samsungPay = samsungPay; - return this; + /** + * Add all map key/value pairs to `extraParams` map. 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.Alma#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 + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay { /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setSamsungPay(EmptyParam samsungPay) { - this.samsungPay = samsungPay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - public Builder setSatispay( - PaymentIntentConfirmParams.PaymentMethodOptions.Satispay satispay) { - this.satispay = satispay; - return this; + private AmazonPay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - public Builder setSatispay(EmptyParam satispay) { - this.satispay = satispay; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the - * SEPA Debit payment method options. - */ - public Builder setSepaDebit( - PaymentIntentConfirmParams.PaymentMethodOptions.SepaDebit sepaDebit) { - this.sepaDebit = sepaDebit; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the - * SEPA Debit payment method options. - */ - public Builder setSepaDebit(EmptyParam sepaDebit) { - this.sepaDebit = sepaDebit; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.AmazonPay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.AmazonPay(this.extraParams); + } - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - public Builder setShopeepay( - PaymentIntentConfirmParams.PaymentMethodOptions.Shopeepay shopeepay) { - this.shopeepay = shopeepay; - 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.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; + } - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - public Builder setShopeepay(EmptyParam shopeepay) { - this.shopeepay = shopeepay; - return this; + /** + * Add all map key/value pairs to `extraParams` map. 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; + } } + } - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - public Builder setSofort(PaymentIntentConfirmParams.PaymentMethodOptions.Sofort sofort) { - this.sofort = sofort; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit { + /** Required. The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - public Builder setSofort(EmptyParam sofort) { - this.sofort = sofort; - return this; - } + /** Required. Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setStripeBalance( - PaymentIntentConfirmParams.PaymentMethodOptions.StripeBalance stripeBalance) { - this.stripeBalance = stripeBalance; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. - */ - public Builder setStripeBalance(EmptyParam stripeBalance) { - this.stripeBalance = stripeBalance; - return this; + private AuBecsDebit(String accountNumber, String bsbNumber, Map extraParams) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; } - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - public Builder setSwish(PaymentIntentConfirmParams.PaymentMethodOptions.Swish swish) { - this.swish = swish; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - public Builder setSwish(EmptyParam swish) { - this.swish = swish; - return this; - } + public static class Builder { + private String accountNumber; - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - public Builder setTwint(PaymentIntentConfirmParams.PaymentMethodOptions.Twint twint) { - this.twint = twint; - return this; - } + private String bsbNumber; - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - public Builder setTwint(EmptyParam twint) { - this.twint = twint; - return this; - } + private Map extraParams; - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about - * the US bank account payment method options. - */ - public Builder setUsBankAccount( - PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount usBankAccount) { - this.usBankAccount = usBankAccount; - return this; - } - - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about - * the US bank account payment method options. - */ - public Builder setUsBankAccount(EmptyParam usBankAccount) { - this.usBankAccount = usBankAccount; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit build() { + return new PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit( + this.accountNumber, this.bsbNumber, this.extraParams); + } - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - public Builder setWechatPay( - PaymentIntentConfirmParams.PaymentMethodOptions.WechatPay wechatPay) { - this.wechatPay = wechatPay; - return this; - } + /** Required. The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - public Builder setWechatPay(EmptyParam wechatPay) { - this.wechatPay = wechatPay; - return this; - } + /** Required. Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip - * payment method options. - */ - public Builder setZip(PaymentIntentConfirmParams.PaymentMethodOptions.Zip zip) { - this.zip = zip; - return this; - } + /** + * Add a key/value pair to `extraParams` map. 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; + } - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip - * payment method options. - */ - public Builder setZip(EmptyParam zip) { - this.zip = zip; - return this; + /** + * Add all map key/value pairs to `extraParams` map. 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 @EqualsAndHashCode(callSuper = false) - public static class AcssDebit { + 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. @@ -15413,59 +15119,14 @@ public static class AcssDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - String targetDate; - - /** Bank account verification method. */ - @SerializedName("verification_method") - VerificationMethod verificationMethod; + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + String sortCode; - private AcssDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate, - VerificationMethod verificationMethod) { + private BacsDebit(String accountNumber, Map extraParams, String sortCode) { + this.accountNumber = accountNumber; this.extraParams = extraParams; - this.mandateOptions = mandateOptions; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - this.verificationMethod = verificationMethod; + this.sortCode = sortCode; } public static Builder builder() { @@ -15473,31 +15134,29 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; - - private MandateOptions mandateOptions; - - private ApiRequestParams.EnumParam setupFutureUsage; + private String accountNumber; - private String targetDate; + private Map extraParams; - private VerificationMethod verificationMethod; + private String sortCode; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit( - this.extraParams, - this.mandateOptions, - this.setupFutureUsage, - this.targetDate, - this.verificationMethod); + 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.PaymentMethodOptions.AcssDebit#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BacsDebit#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -15510,8 +15169,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BacsDebit#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -15521,440 +15180,233 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Additional fields for Mandate creation. */ - public Builder setMandateOptions( - PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions - mandateOptions) { - this.mandateOptions = mandateOptions; + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + public Builder setSortCode(String sortCode) { + this.sortCode = sortCode; return this; } + } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; + @Getter + @EqualsAndHashCode(callSuper = false) + 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); } /** - * 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}. + * Add a key/value pair to `extraParams` map. 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 setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. + * Add all map key/value pairs to `extraParams` map. 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 setTargetDate(String targetDate) { - this.targetDate = targetDate; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } - /** Bank account verification method. */ - public Builder setVerificationMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod - verificationMethod) { - this.verificationMethod = verificationMethod; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billie { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Billie(Map extraParams) { + this.extraParams = extraParams; } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - @SerializedName("custom_mandate_url") - Object customMandateUrl; + 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.Billie build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Billie(this.extraParams); + } /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. + * Add a key/value pair to `extraParams` map. 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.Billie#extraParams} for the + * field documentation. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. + * Add all map key/value pairs to `extraParams` map. 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.Billie#extraParams} for the + * field documentation. */ - @SerializedName("interval_description") - String intervalDescription; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - /** Payment schedule for the mandate. */ - @SerializedName("payment_schedule") - PaymentSchedule paymentSchedule; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails { + /** Billing address. */ + @SerializedName("address") + Object address; - /** Transaction type of the mandate. */ - @SerializedName("transaction_type") - TransactionType transactionType; + /** Email address. */ + @SerializedName("email") + Object email; - private MandateOptions( - Object customMandateUrl, - Map extraParams, - String intervalDescription, - PaymentSchedule paymentSchedule, - TransactionType transactionType) { - this.customMandateUrl = customMandateUrl; - this.extraParams = extraParams; - this.intervalDescription = intervalDescription; - this.paymentSchedule = paymentSchedule; - this.transactionType = transactionType; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** Full name. */ + @SerializedName("name") + Object name; - public static class Builder { - private Object customMandateUrl; + /** Billing phone number (including extension). */ + @SerializedName("phone") + Object phone; - private Map extraParams; + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and + * non-LATAM sellers. + */ + @SerializedName("tax_id") + String taxId; - private String intervalDescription; + private BillingDetails( + Object address, + Object email, + Map extraParams, + Object name, + Object phone, + String taxId) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + this.taxId = taxId; + } - private PaymentSchedule paymentSchedule; + public static Builder builder() { + return new Builder(); + } - private TransactionType transactionType; + public static class Builder { + private Object address; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions( - this.customMandateUrl, - this.extraParams, - this.intervalDescription, - this.paymentSchedule, - this.transactionType); - } + private Object email; - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - public Builder setCustomMandateUrl(String customMandateUrl) { - this.customMandateUrl = customMandateUrl; - return this; - } + private Map extraParams; - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - public Builder setCustomMandateUrl(EmptyParam customMandateUrl) { - this.customMandateUrl = customMandateUrl; - return this; - } + private Object 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.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Object phone; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. - */ - public Builder setIntervalDescription(String intervalDescription) { - this.intervalDescription = intervalDescription; - return this; - } - - /** Payment schedule for the mandate. */ - public Builder setPaymentSchedule( - PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions - .PaymentSchedule - paymentSchedule) { - this.paymentSchedule = paymentSchedule; - return this; - } - - /** Transaction type of the mandate. */ - public Builder setTransactionType( - PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions - .TransactionType - transactionType) { - this.transactionType = transactionType; - return this; - } - } - - public enum PaymentSchedule implements ApiRequestParams.EnumParam { - @SerializedName("combined") - COMBINED("combined"), - - @SerializedName("interval") - INTERVAL("interval"), - - @SerializedName("sporadic") - SPORADIC("sporadic"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PaymentSchedule(String value) { - this.value = value; - } - } - - public enum TransactionType implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), - - @SerializedName("personal") - PERSONAL("personal"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - TransactionType(String value) { - this.value = value; - } - } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"), - - @SerializedName("on_session") - ON_SESSION("on_session"); - - @Getter(onMethod_ = {@Override}) - private final String value; + private String taxId; - SetupFutureUsage(String value) { - this.value = value; + /** 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, this.taxId); } - } - - public enum VerificationMethod implements ApiRequestParams.EnumParam { - @SerializedName("automatic") - AUTOMATIC("automatic"), - - @SerializedName("instant") - INSTANT("instant"), - - @SerializedName("microdeposits") - MICRODEPOSITS("microdeposits"); - - @Getter(onMethod_ = {@Override}) - private final String value; - VerificationMethod(String value) { - this.value = value; + /** Billing address. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address address) { + this.address = address; + return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Affirm { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Preferred language of the Affirm authorization page that the customer is redirected to. */ - @SerializedName("preferred_locale") - String preferredLocale; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; - private Affirm( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - String preferredLocale, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.preferredLocale = preferredLocale; - this.setupFutureUsage = setupFutureUsage; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - - private Map extraParams; - - private String preferredLocale; - - private SetupFutureUsage setupFutureUsage; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Affirm build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Affirm( - this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); + /** Billing address. */ + public Builder setAddress(EmptyParam address) { + this.address = address; + return this; } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; + /** Email address. */ + public Builder setEmail(String email) { + this.email = email; return this; } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; + /** 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.PaymentMethodOptions.Affirm#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BillingDetails#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -15967,8 +15419,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Affirm#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BillingDetails#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -15978,87 +15430,203 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Preferred language of the Affirm authorization page that the customer is redirected to. - */ - public Builder setPreferredLocale(String preferredLocale) { - this.preferredLocale = preferredLocale; + /** Full name. */ + public Builder setName(String name) { + this.name = name; 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}. + /** 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; + } + + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and + * non-LATAM sellers. */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Affirm.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder setTaxId(String taxId) { + this.taxId = taxId; return this; } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - CaptureMethod(String value) { - this.value = value; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the 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 enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private String city; - SetupFutureUsage(String value) { - this.value = value; + 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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the 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 @EqualsAndHashCode(callSuper = false) - public static class AfterpayClearpay { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + 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. @@ -16068,49 +15636,8 @@ public static class AfterpayClearpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * An internal identifier or reference that this payment corresponds to. You must limit the - * identifier to 128 characters, and it can only contain letters, numbers, underscores, - * backslashes, and dashes. This field differs from the statement descriptor and item name. - */ - @SerializedName("reference") - String reference; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; - - private AfterpayClearpay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - String reference, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + private Blik(Map extraParams) { this.extraParams = extraParams; - this.reference = reference; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -16118,57 +15645,17 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private String reference; - - private SetupFutureUsage setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay( - this.captureMethod, this.extraParams, this.reference, this.setupFutureUsage); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod - captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + 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.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Blik#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16182,8 +15669,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Blik#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16193,77 +15679,12 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - - /** - * An internal identifier or reference that this payment corresponds to. You must limit the - * identifier to 128 characters, and it can only contain letters, numbers, underscores, - * backslashes, and dashes. This field differs from the statement descriptor and item name. - */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Alipay { + 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. @@ -16274,34 +15695,15 @@ public static class Alipay { Map extraParams; /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Required. The tax ID of the customer (CPF for individual consumers or CNPJ + * for businesses consumers) */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + @SerializedName("tax_id") + String taxId; - private Alipay(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + private Boleto(Map extraParams, String taxId) { this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; + this.taxId = taxId; } public static Builder builder() { @@ -16311,19 +15713,19 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; + private String taxId; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Alipay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Alipay( - this.extraParams, this.setupFutureUsage); + 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.PaymentMethodOptions.Alipay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16336,8 +15738,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alipay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16348,98 +15750,19 @@ public Builder putAllExtraParam(Map map) { } /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Alipay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Required. The tax ID of the customer (CPF for individual consumers or + * CNPJ for businesses consumers) */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder setTaxId(String taxId) { + this.taxId = taxId; return this; } } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } - } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Alma { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + 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. @@ -16449,8 +15772,7 @@ public static class Alma { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; + private Cashapp(Map extraParams) { this.extraParams = extraParams; } @@ -16459,51 +15781,75 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Alma build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Alma( - this.captureMethod, this.extraParams); + public PaymentIntentConfirmParams.PaymentMethodData.Cashapp build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Cashapp(this.extraParams); } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * Add a key/value pair to `extraParams` map. 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 setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * Add all map key/value pairs to `extraParams` map. 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 setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Crypto(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.Crypto build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Crypto(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.PaymentMethodOptions.Alma#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Crypto#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16517,7 +15863,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alma#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Crypto#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16528,36 +15874,11 @@ public Builder putAllExtraParam(Map map) { return this; } } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } } @Getter @EqualsAndHashCode(callSuper = false) - public static class AmazonPay { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + 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. @@ -16567,35 +15888,8 @@ public static class AmazonPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply - * with regional legislation and network rules, such as SCA. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - private AmazonPay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; + private CustomerBalance(Map extraParams) { this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -16603,54 +15897,89 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay( - this.captureMethod, this.extraParams, this.setupFutureUsage); + public PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance build() { + return new PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance(this.extraParams); } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * Add a key/value pair to `extraParams` map. 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 setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * Add all map key/value pairs to `extraParams` map. 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 setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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.PaymentMethodOptions.AmazonPay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Eps#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16663,8 +15992,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Eps#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16673,83 +16002,97 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("arzte_und_apotheker_bank") + ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @SerializedName("austrian_anadi_bank_ag") + AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"), - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + @SerializedName("bank_austria") + BANK_AUSTRIA("bank_austria"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("bankhaus_carl_spangler") + BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), - CaptureMethod(String value) { - this.value = value; - } - } + @SerializedName("bankhaus_schelhammer_und_schattera_ag") + BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("bawag_psk_ag") + BAWAG_PSK_AG("bawag_psk_ag"), - @SerializedName("off_session") - OFF_SESSION("off_session"); + @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; - SetupFutureUsage(String value) { + Bank(String value) { this.value = value; } } @@ -16757,7 +16100,15 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class AuBecsDebit { + 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. @@ -16767,47 +16118,10 @@ public static class AuBecsDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - String targetDate; - - private AuBecsDebit( - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate) { + private Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) { + this.accountHolderType = accountHolderType; + this.bank = bank; this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; } public static Builder builder() { @@ -16815,23 +16129,36 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; + private AccountHolderType accountHolderType; - private ApiRequestParams.EnumParam setupFutureUsage; + private Bank bank; - private String targetDate; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage, this.targetDate); + public PaymentIntentConfirmParams.PaymentMethodData.Fpx build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Fpx( + this.accountHolderType, this.bank, this.extraParams); + } + + /** Account holder type for FPX transaction. */ + public Builder setAccountHolderType( + PaymentIntentConfirmParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { + this.accountHolderType = accountHolderType; + return this; + } + + /** Required. The customer's bank. */ + public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Fpx.Bank bank) { + this.bank = bank; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Fpx#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16844,8 +16171,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Fpx#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16854,92 +16181,94 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; + public enum AccountHolderType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("individual") + INDIVIDUAL("individual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountHolderType(String value) { + this.value = value; } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("affin_bank") + AFFIN_BANK("affin_bank"), - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(String targetDate) { - this.targetDate = targetDate; - return this; - } - } + @SerializedName("agrobank") + AGROBANK("agrobank"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("alliance_bank") + ALLIANCE_BANK("alliance_bank"), - @SerializedName("off_session") - OFF_SESSION("off_session"), + @SerializedName("ambank") + AMBANK("ambank"), - @SerializedName("on_session") - ON_SESSION("on_session"); + @SerializedName("bank_islam") + BANK_ISLAM("bank_islam"), + + @SerializedName("bank_muamalat") + BANK_MUAMALAT("bank_muamalat"), + + @SerializedName("bank_of_china") + BANK_OF_CHINA("bank_of_china"), + + @SerializedName("bank_rakyat") + BANK_RAKYAT("bank_rakyat"), + + @SerializedName("bsn") + BSN("bsn"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("deutsche_bank") + DEUTSCHE_BANK("deutsche_bank"), + + @SerializedName("hong_leong_bank") + HONG_LEONG_BANK("hong_leong_bank"), + + @SerializedName("hsbc") + HSBC("hsbc"), + + @SerializedName("kfh") + KFH("kfh"), + + @SerializedName("maybank2e") + MAYBANK2E("maybank2e"), + + @SerializedName("maybank2u") + MAYBANK2U("maybank2u"), + + @SerializedName("ocbc") + OCBC("ocbc"), + + @SerializedName("pb_enterprise") + PB_ENTERPRISE("pb_enterprise"), + + @SerializedName("public_bank") + PUBLIC_BANK("public_bank"), + + @SerializedName("rhb") + RHB("rhb"), + + @SerializedName("standard_chartered") + STANDARD_CHARTERED("standard_chartered"), + + @SerializedName("uob") + UOB("uob"); @Getter(onMethod_ = {@Override}) private final String value; - SetupFutureUsage(String value) { + Bank(String value) { this.value = value; } } @@ -16947,7 +16276,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class BacsDebit { + public static class Giropay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -16957,53 +16286,8 @@ public static class BacsDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - String targetDate; - - private BacsDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate) { + private Giropay(Map extraParams) { this.extraParams = extraParams; - this.mandateOptions = mandateOptions; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; } public static Builder builder() { @@ -17013,23 +16297,16 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private MandateOptions mandateOptions; - - private ApiRequestParams.EnumParam setupFutureUsage; - - private String targetDate; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); + public PaymentIntentConfirmParams.PaymentMethodData.Giropay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Giropay(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Giropay#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17042,8 +16319,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Giropay#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17052,201 +16329,132 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } + } - /** Additional fields for Mandate creation. */ - public Builder setMandateOptions( - PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions - mandateOptions) { - this.mandateOptions = mandateOptions; - return this; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Gopay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Gopay(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.Gopay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Gopay(this.extraParams); } /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Add a key/value pair to `extraParams` map. 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.Gopay#extraParams} for the + * field documentation. */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); 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; - } - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. + * Add all map key/value pairs to `extraParams` map. 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.Gopay#extraParams} for the + * field documentation. */ - public Builder setTargetDate(String targetDate) { - this.targetDate = targetDate; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special characters: - * '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - */ - @SerializedName("reference_prefix") - Object referencePrefix; - - private MandateOptions(Map extraParams, Object referencePrefix) { - this.extraParams = extraParams; - this.referencePrefix = referencePrefix; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Object referencePrefix; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions( - this.extraParams, this.referencePrefix); - } + private Grabpay(Map extraParams) { + this.extraParams = 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.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + public static class Builder { + private Map extraParams; - /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special - * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - */ - public Builder setReferencePrefix(String referencePrefix) { - this.referencePrefix = referencePrefix; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Grabpay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Grabpay(this.extraParams); + } - /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special - * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - */ - public Builder setReferencePrefix(EmptyParam referencePrefix) { - this.referencePrefix = referencePrefix; - 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.Grabpay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); } + this.extraParams.put(key, value); + return this; } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"), - - @SerializedName("on_session") - ON_SESSION("on_session"); - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Bancontact { + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -17256,45 +16464,9 @@ public static class Bancontact { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Preferred language of the Bancontact authorization page that the customer is redirected to. - */ - @SerializedName("preferred_language") - PreferredLanguage preferredLanguage; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - private Bancontact( - Map extraParams, - PreferredLanguage preferredLanguage, - ApiRequestParams.EnumParam setupFutureUsage) { + private IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; this.extraParams = extraParams; - this.preferredLanguage = preferredLanguage; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -17302,22 +16474,27 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; - - private PreferredLanguage preferredLanguage; + private Bank bank; - private ApiRequestParams.EnumParam setupFutureUsage; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact( - this.extraParams, this.preferredLanguage, this.setupFutureUsage); + public PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer build() { + return new PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank( + PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact#extraParams} + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -17331,7 +16508,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact#extraParams} + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -17341,111 +16518,28 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } - /** - * Preferred language of the Bancontact authorization page that the customer is redirected - * to. - */ - public Builder setPreferredLanguage( - PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact.PreferredLanguage - preferredLanguage) { - this.preferredLanguage = preferredLanguage; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } - - public enum PreferredLanguage implements ApiRequestParams.EnumParam { - @SerializedName("de") - DE("de"), - - @SerializedName("en") - EN("en"), - - @SerializedName("fr") - FR("fr"), - - @SerializedName("nl") - NL("nl"); + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("bni") + BNI("bni"), - PreferredLanguage(String value) { - this.value = value; - } - } + @SerializedName("bri") + BRI("bri"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("cimb") + CIMB("cimb"), - @SerializedName("off_session") - OFF_SESSION("off_session"); + @SerializedName("permata") + PERMATA("permata"); @Getter(onMethod_ = {@Override}) private final String value; - SetupFutureUsage(String value) { + Bank(String value) { this.value = value; } } @@ -17453,19 +16547,13 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Billie { + public static class Ideal { /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. + * The customer's bank. Only use this parameter for existing customers. Don't use it for new + * customers. */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + @SerializedName("bank") + Bank bank; /** * Map of extra parameters for custom features not available in this client library. The @@ -17476,8 +16564,8 @@ public static class Billie { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; + private Ideal(Bank bank, Map extraParams) { + this.bank = bank; this.extraParams = extraParams; } @@ -17486,52 +16574,30 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Bank bank; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Billie build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Billie( - this.captureMethod, this.extraParams); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentConfirmParams.PaymentMethodData.Ideal build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Ideal( + this.bank, this.extraParams); } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * The customer's bank. Only use this parameter for existing customers. Don't use it for new + * customers. */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; + public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Ideal.Bank bank) { + this.bank = bank; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Billie#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Ideal#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17544,8 +16610,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Billie#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Ideal#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17556,14 +16622,62 @@ public Builder putAllExtraParam(Map map) { } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("abn_amro") + ABN_AMRO("abn_amro"), + + @SerializedName("asn_bank") + ASN_BANK("asn_bank"), + + @SerializedName("bunq") + BUNQ("bunq"), + + @SerializedName("buut") + BUUT("buut"), + + @SerializedName("handelsbanken") + HANDELSBANKEN("handelsbanken"), + + @SerializedName("ing") + ING("ing"), + + @SerializedName("knab") + KNAB("knab"), + + @SerializedName("moneyou") + MONEYOU("moneyou"), + + @SerializedName("n26") + N26("n26"), + + @SerializedName("nn") + NN("nn"), + + @SerializedName("rabobank") + RABOBANK("rabobank"), + + @SerializedName("regiobank") + REGIOBANK("regiobank"), + + @SerializedName("revolut") + REVOLUT("revolut"), + + @SerializedName("sns_bank") + SNS_BANK("sns_bank"), + + @SerializedName("triodos_bank") + TRIODOS_BANK("triodos_bank"), + + @SerializedName("van_lanschot") + VAN_LANSCHOT("van_lanschot"), + + @SerializedName("yoursafe") + YOURSAFE("yoursafe"); @Getter(onMethod_ = {@Override}) private final String value; - CaptureMethod(String value) { + Bank(String value) { this.value = value; } } @@ -17571,14 +16685,7 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Blik { - /** - * The 6-digit BLIK code that a customer has generated using their banking application. Can - * only be set on confirmation. - */ - @SerializedName("code") - String code; - + public static class InteracPresent { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -17588,39 +16695,8 @@ public static class Blik { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - private Blik( - String code, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.code = code; + private InteracPresent(Map extraParams) { this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -17628,32 +16704,18 @@ public static Builder builder() { } public static class Builder { - private String code; - private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Blik build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Blik( - this.code, this.extraParams, this.setupFutureUsage); - } - - /** - * The 6-digit BLIK code that a customer has generated using their banking application. Can - * only be set on confirmation. - */ - public Builder setCode(String code) { - this.code = code; - return this; + public PaymentIntentConfirmParams.PaymentMethodData.InteracPresent build() { + return new PaymentIntentConfirmParams.PaymentMethodData.InteracPresent(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Blik#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.InteracPresent#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17666,8 +16728,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Blik#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.InteracPresent#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17676,91 +16738,73 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private KakaoPay(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.KakaoPay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.KakaoPay(this.extraParams); + } /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Add a key/value pair to `extraParams` map. 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.KakaoPay#extraParams} for + * the field documentation. */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Blik.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); 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}. + * Add all map key/value pairs to `extraParams` map. 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.KakaoPay#extraParams} for + * the field documentation. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } - } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Boleto { - /** - * The number of calendar days before a Boleto voucher expires. For example, if you create a - * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will - * expire on Wednesday at 23:59 America/Sao_Paulo time. - */ - @SerializedName("expires_after_days") - Long expiresAfterDays; + public static class Klarna { + /** Customer's date of birth. */ + @SerializedName("dob") + Dob dob; /** * Map of extra parameters for custom features not available in this client library. The @@ -17771,39 +16815,9 @@ public static class Boleto { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - private Boleto( - Long expiresAfterDays, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.expiresAfterDays = expiresAfterDays; + private Klarna(Dob dob, Map extraParams) { + this.dob = dob; this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -17811,33 +16825,27 @@ public static Builder builder() { } public static class Builder { - private Long expiresAfterDays; + private Dob dob; private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Boleto build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Boleto( - this.expiresAfterDays, this.extraParams, this.setupFutureUsage); + public PaymentIntentConfirmParams.PaymentMethodData.Klarna build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Klarna( + this.dob, this.extraParams); } - /** - * The number of calendar days before a Boleto voucher expires. For example, if you create a - * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will - * expire on Wednesday at 23:59 America/Sao_Paulo time. - */ - public Builder setExpiresAfterDays(Long expiresAfterDays) { - this.expiresAfterDays = expiresAfterDays; + /** Customer's date of birth. */ + public Builder setDob(PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob dob) { + this.dob = dob; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Boleto#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17850,8 +16858,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Boleto#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17860,111 +16868,111 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Boleto.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Dob { + /** Required. The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; /** - * 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}. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of birth. */ + @SerializedName("year") + Long year; + + private Dob(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("off_session") - OFF_SESSION("off_session"), + public static class Builder { + private Long day; - @SerializedName("on_session") - ON_SESSION("on_session"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private Long month; - SetupFutureUsage(String value) { - this.value = value; + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Card { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - - /** - * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, the - * CVC value will be verified during the card payment attempt. This parameter can only be - * provided during confirmation. - */ - @SerializedName("cvc_token") - String cvcToken; - + public static class Konbini { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -17974,315 +16982,84 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - @SerializedName("installments") - Installments installments; + private Konbini(Map extraParams) { + this.extraParams = extraParams; + } - /** Configuration options for setting up an eMandate for cards issued in India. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + public static Builder builder() { + return new Builder(); + } - /** - * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail - * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided - * during confirmation. - */ - @SerializedName("moto") - Boolean moto; + public static class Builder { + private Map extraParams; - /** - * Selected network to process this PaymentIntent on. Depends on the available networks of the - * card attached to the PaymentIntent. Can be only set confirm-time. - */ - @SerializedName("network") - Network network; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Konbini build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Konbini(this.extraParams); + } - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - @SerializedName("request_decremental_authorization") - RequestDecrementalAuthorization requestDecrementalAuthorization; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Request ability to capture beyond the standard - * authorization validity window for this PaymentIntent. - */ - @SerializedName("request_extended_authorization") - RequestExtendedAuthorization requestExtendedAuthorization; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KrCard { /** - * Request ability to increment the - * authorization for this PaymentIntent. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - @SerializedName("request_incremental_authorization") - RequestIncrementalAuthorization requestIncrementalAuthorization; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - @SerializedName("request_multicapture") - RequestMulticapture requestMulticapture; + private KrCard(Map extraParams) { + this.extraParams = extraParams; + } - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - @SerializedName("request_overcapture") - RequestOvercapture requestOvercapture; + public static Builder builder() { + return new Builder(); + } - /** Request partial authorization on this PaymentIntent. */ - @SerializedName("request_partial_authorization") - RequestPartialAuthorization requestPartialAuthorization; - - /** - * We strongly recommend that you rely on our SCA Engine to automatically prompt your - * customers for authentication based on risk level and other requirements. - * However, if you wish to request 3D Secure based on logic from your own fraud engine, - * provide this option. If not provided, this value defaults to {@code automatic}. Read our - * guide on manually - * requesting 3D Secure for more information on how this configuration interacts with - * Radar and our SCA Engine. - */ - @SerializedName("request_three_d_secure") - RequestThreeDSecure requestThreeDSecure; - - /** - * When enabled, using a card that is attached to a customer will require the CVC to be - * provided again (i.e. using the cvc_token parameter). - */ - @SerializedName("require_cvc_recollection") - Boolean requireCvcRecollection; - - /** - * 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; - - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor - * that’s set on the account to form the complete statement descriptor. Maximum 22 characters. - * On card statements, the concatenation of both prefix and suffix (including - * separators) will appear truncated to 22 characters. - */ - @SerializedName("statement_descriptor_suffix_kana") - Object statementDescriptorSuffixKana; - - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 - * characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. - */ - @SerializedName("statement_descriptor_suffix_kanji") - Object statementDescriptorSuffixKanji; - - /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. - */ - @SerializedName("statement_details") - Object statementDetails; - - /** - * If 3D Secure authentication was performed with a third-party provider, the authentication - * details to use for this payment. - */ - @SerializedName("three_d_secure") - ThreeDSecure threeDSecure; - - private Card( - ApiRequestParams.EnumParam captureMethod, - String cvcToken, - Map extraParams, - Installments installments, - MandateOptions mandateOptions, - Boolean moto, - Network network, - RequestDecrementalAuthorization requestDecrementalAuthorization, - RequestExtendedAuthorization requestExtendedAuthorization, - RequestIncrementalAuthorization requestIncrementalAuthorization, - RequestMulticapture requestMulticapture, - RequestOvercapture requestOvercapture, - RequestPartialAuthorization requestPartialAuthorization, - RequestThreeDSecure requestThreeDSecure, - Boolean requireCvcRecollection, - ApiRequestParams.EnumParam setupFutureUsage, - Object statementDescriptorSuffixKana, - Object statementDescriptorSuffixKanji, - Object statementDetails, - ThreeDSecure threeDSecure) { - this.captureMethod = captureMethod; - this.cvcToken = cvcToken; - this.extraParams = extraParams; - this.installments = installments; - this.mandateOptions = mandateOptions; - this.moto = moto; - this.network = network; - this.requestDecrementalAuthorization = requestDecrementalAuthorization; - this.requestExtendedAuthorization = requestExtendedAuthorization; - this.requestIncrementalAuthorization = requestIncrementalAuthorization; - this.requestMulticapture = requestMulticapture; - this.requestOvercapture = requestOvercapture; - this.requestPartialAuthorization = requestPartialAuthorization; - this.requestThreeDSecure = requestThreeDSecure; - this.requireCvcRecollection = requireCvcRecollection; - this.setupFutureUsage = setupFutureUsage; - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; - this.statementDetails = statementDetails; - this.threeDSecure = threeDSecure; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - - private String cvcToken; - - private Map extraParams; - - private Installments installments; - - private MandateOptions mandateOptions; - - private Boolean moto; - - private Network network; - - private RequestDecrementalAuthorization requestDecrementalAuthorization; - - private RequestExtendedAuthorization requestExtendedAuthorization; - - private RequestIncrementalAuthorization requestIncrementalAuthorization; - - private RequestMulticapture requestMulticapture; - - private RequestOvercapture requestOvercapture; - - private RequestPartialAuthorization requestPartialAuthorization; - - private RequestThreeDSecure requestThreeDSecure; - - private Boolean requireCvcRecollection; - - private ApiRequestParams.EnumParam setupFutureUsage; - - private Object statementDescriptorSuffixKana; - - private Object statementDescriptorSuffixKanji; - - private Object statementDetails; - - private ThreeDSecure threeDSecure; + public static class Builder { + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card( - this.captureMethod, - this.cvcToken, - this.extraParams, - this.installments, - this.mandateOptions, - this.moto, - this.network, - this.requestDecrementalAuthorization, - this.requestExtendedAuthorization, - this.requestIncrementalAuthorization, - this.requestMulticapture, - this.requestOvercapture, - this.requestPartialAuthorization, - this.requestThreeDSecure, - this.requireCvcRecollection, - this.setupFutureUsage, - this.statementDescriptorSuffixKana, - this.statementDescriptorSuffixKanji, - this.statementDetails, - this.threeDSecure); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, - * the CVC value will be verified during the card payment attempt. This parameter can only - * be provided during confirmation. - */ - public Builder setCvcToken(String cvcToken) { - this.cvcToken = cvcToken; - return this; + public PaymentIntentConfirmParams.PaymentMethodData.KrCard build() { + return new PaymentIntentConfirmParams.PaymentMethodData.KrCard(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.PaymentMethodOptions.Card#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.KrCard#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -18296,7 +17073,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Card#extraParams} for the + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.KrCard#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -18306,289 +17083,12404 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } + } - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - public Builder setInstallments( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments installments) { - this.installments = installments; - return this; - } - - /** Configuration options for setting up an eMandate for cards issued in India. */ - public Builder setMandateOptions( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions mandateOptions) { - this.mandateOptions = mandateOptions; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Link { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail - * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided - * during confirmation. - */ - public Builder setMoto(Boolean moto) { - this.moto = moto; - return this; + private Link(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Link build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Link(this.extraParams); } /** - * Selected network to process this PaymentIntent on. Depends on the available networks of - * the card attached to the PaymentIntent. Can be only set confirm-time. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the + * field documentation. */ - public Builder setNetwork( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.Network network) { - this.network = network; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Request ability to decrement the - * authorization for this PaymentIntent. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the + * field documentation. */ - public Builder setRequestDecrementalAuthorization( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization - requestDecrementalAuthorization) { - this.requestDecrementalAuthorization = requestDecrementalAuthorization; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.MbWay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.MbWay(this.extraParams); + } /** - * Request ability to capture beyond the - * standard authorization validity window for this PaymentIntent. + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the + * field documentation. */ - public Builder setRequestExtendedAuthorization( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestExtendedAuthorization - requestExtendedAuthorization) { - this.requestExtendedAuthorization = requestExtendedAuthorization; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Request ability to increment the - * authorization for this PaymentIntent. + * Add all map key/value pairs to `extraParams` map. 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.MbWay#extraParams} for the + * field documentation. */ - public Builder setRequestIncrementalAuthorization( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization - requestIncrementalAuthorization) { - this.requestIncrementalAuthorization = requestIncrementalAuthorization; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Mobilepay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Mobilepay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Mobilepay(this.extraParams); + } /** - * Request ability to make multiple - * captures for this PaymentIntent. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for + * the field documentation. */ - public Builder setRequestMulticapture( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestMulticapture - requestMulticapture) { - this.requestMulticapture = requestMulticapture; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Request ability to overcapture - * for this PaymentIntent. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for + * the field documentation. */ - public Builder setRequestOvercapture( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestOvercapture - requestOvercapture) { - this.requestOvercapture = requestOvercapture; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } - /** Request partial authorization on this PaymentIntent. */ - public Builder setRequestPartialAuthorization( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestPartialAuthorization - requestPartialAuthorization) { - this.requestPartialAuthorization = requestPartialAuthorization; - return this; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Multibanco { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Multibanco(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Multibanco build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Multibanco(this.extraParams); } /** - * We strongly recommend that you rely on our SCA Engine to automatically prompt your - * customers for authentication based on risk level and other requirements. - * However, if you wish to request 3D Secure based on logic from your own fraud engine, - * provide this option. If not provided, this value defaults to {@code automatic}. Read our - * guide on manually - * requesting 3D Secure for more information on how this configuration interacts with - * Radar and our SCA Engine. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Multibanco#extraParams} for + * the field documentation. */ - public Builder setRequestThreeDSecure( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestThreeDSecure - requestThreeDSecure) { - this.requestThreeDSecure = requestThreeDSecure; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * When enabled, using a card that is attached to a customer will require the CVC to be - * provided again (i.e. using the cvc_token parameter). + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Multibanco#extraParams} for + * the field documentation. */ - public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { - this.requireCvcRecollection = requireCvcRecollection; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NaverPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this + * defaults to {@code card}. + */ + @SerializedName("funding") + Funding funding; + + private NaverPay(Map extraParams, Funding funding) { + this.extraParams = extraParams; + this.funding = funding; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Funding funding; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.NaverPay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.NaverPay( + this.extraParams, this.funding); } /** - * 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}. + * Add a key/value pair to `extraParams` map. 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.NaverPay#extraParams} for + * the field documentation. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 22 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 22 characters. + * Add all map key/value pairs to `extraParams` map. 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.NaverPay#extraParams} for + * the field documentation. */ - public Builder setStatementDescriptorSuffixKana(String statementDescriptorSuffixKana) { - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 22 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 22 characters. + * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this + * defaults to {@code card}. */ - public Builder setStatementDescriptorSuffixKana(EmptyParam statementDescriptorSuffixKana) { - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + public Builder setFunding( + PaymentIntentConfirmParams.PaymentMethodData.NaverPay.Funding funding) { + this.funding = funding; return this; } + } + + public enum Funding implements ApiRequestParams.EnumParam { + @SerializedName("card") + CARD("card"), + + @SerializedName("points") + POINTS("points"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Funding(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NzBankAccount { + /** + * The name on the bank account. Only required if the account holder name is different from + * the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** Required. The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Required. The numeric code for the bank account's bank. */ + @SerializedName("bank_code") + String bankCode; + + /** Required. The numeric code for the bank account's bank branch. */ + @SerializedName("branch_code") + String branchCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + @SerializedName("reference") + String reference; + + /** Required. The suffix of the bank account number. */ + @SerializedName("suffix") + String suffix; + + private NzBankAccount( + String accountHolderName, + String accountNumber, + String bankCode, + String branchCode, + Map extraParams, + String reference, + String suffix) { + this.accountHolderName = accountHolderName; + this.accountNumber = accountNumber; + this.bankCode = bankCode; + this.branchCode = branchCode; + this.extraParams = extraParams; + this.reference = reference; + this.suffix = suffix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountHolderName; + + private String accountNumber; + + private String bankCode; + + private String branchCode; + + private Map extraParams; + + private String reference; + + private String suffix; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.NzBankAccount build() { + return new PaymentIntentConfirmParams.PaymentMethodData.NzBankAccount( + this.accountHolderName, + this.accountNumber, + this.bankCode, + this.branchCode, + this.extraParams, + this.reference, + this.suffix); + } /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 17 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. + * The name on the bank account. Only required if the account holder name is different from + * the name of the authorized signatory collected in the PaymentMethod’s billing details. */ - public Builder setStatementDescriptorSuffixKanji(String statementDescriptorSuffixKanji) { - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + public Builder setAccountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; return this; } - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 17 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. - */ - public Builder setStatementDescriptorSuffixKanji( - EmptyParam statementDescriptorSuffixKanji) { - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + /** Required. The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } - /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. + /** Required. The numeric code for the bank account's bank. */ + public Builder setBankCode(String bankCode) { + this.bankCode = bankCode; + return this; + } + + /** Required. The numeric code for the bank account's bank branch. */ + public Builder setBranchCode(String branchCode) { + this.branchCode = branchCode; + 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.NzBankAccount#extraParams} + * for the field documentation. */ - public Builder setStatementDetails( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails - statementDetails) { - this.statementDetails = statementDetails; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. + * Add all map key/value pairs to `extraParams` map. 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.NzBankAccount#extraParams} + * for the field documentation. */ - public Builder setStatementDetails(EmptyParam statementDetails) { - this.statementDetails = statementDetails; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** Required. The suffix of the bank account number. */ + public Builder setSuffix(String suffix) { + this.suffix = suffix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Oxxo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Oxxo(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Oxxo build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Oxxo(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Oxxo#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Oxxo#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class P24 { + /** The customer's bank. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private P24(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.P24 build() { + return new PaymentIntentConfirmParams.PaymentMethodData.P24(this.bank, this.extraParams); + } + + /** The customer's bank. */ + public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.P24.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.P24#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.P24#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("alior_bank") + ALIOR_BANK("alior_bank"), + + @SerializedName("bank_millennium") + BANK_MILLENNIUM("bank_millennium"), + + @SerializedName("bank_nowy_bfg_sa") + BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), + + @SerializedName("bank_pekao_sa") + BANK_PEKAO_SA("bank_pekao_sa"), + + @SerializedName("banki_spbdzielcze") + BANKI_SPBDZIELCZE("banki_spbdzielcze"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + + @SerializedName("boz") + BOZ("boz"), + + @SerializedName("citi_handlowy") + CITI_HANDLOWY("citi_handlowy"), + + @SerializedName("credit_agricole") + CREDIT_AGRICOLE("credit_agricole"), + + @SerializedName("envelobank") + ENVELOBANK("envelobank"), + + @SerializedName("etransfer_pocztowy24") + ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), + + @SerializedName("getin_bank") + GETIN_BANK("getin_bank"), + + @SerializedName("ideabank") + IDEABANK("ideabank"), + + @SerializedName("ing") + ING("ing"), + + @SerializedName("inteligo") + INTELIGO("inteligo"), + + @SerializedName("mbank_mtransfer") + MBANK_MTRANSFER("mbank_mtransfer"), + + @SerializedName("nest_przelew") + NEST_PRZELEW("nest_przelew"), + + @SerializedName("noble_pay") + NOBLE_PAY("noble_pay"), + + @SerializedName("pbac_z_ipko") + PBAC_Z_IPKO("pbac_z_ipko"), + + @SerializedName("plus_bank") + PLUS_BANK("plus_bank"), + + @SerializedName("santander_przelew24") + SANTANDER_PRZELEW24("santander_przelew24"), + + @SerializedName("tmobile_usbugi_bankowe") + TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), + + @SerializedName("toyota_bank") + TOYOTA_BANK("toyota_bank"), + + @SerializedName("velobank") + VELOBANK("velobank"), + + @SerializedName("volkswagen_bank") + VOLKSWAGEN_BANK("volkswagen_bank"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 PayByBank(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.PayByBank build() { + return new PaymentIntentConfirmParams.PaymentMethodData.PayByBank(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.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.PayByBank#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 + @EqualsAndHashCode(callSuper = false) + public static class Payco { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Payco(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Payco build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Payco(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Payco#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Payco#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paynow { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paynow(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Paynow build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Paynow(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paynow#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paynow#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypal(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Paypal build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Paypal(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypal#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypal#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(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.Paypay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Paypay(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.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Paypay#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 + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + private String payId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Payto build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Pix(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Pix build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Pix(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Promptpay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Promptpay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Promptpay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Promptpay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Promptpay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Promptpay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Qris { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Qris(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.Qris build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Qris(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.Qris#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Qris#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 + @EqualsAndHashCode(callSuper = false) + public static class RadarOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A Radar Session is a snapshot of + * the browser metadata and device details that help Radar make more accurate predictions on + * your payments. + */ + @SerializedName("session") + String session; + + private RadarOptions(Map extraParams, String session) { + this.extraParams = extraParams; + this.session = session; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String session; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.RadarOptions build() { + return new PaymentIntentConfirmParams.PaymentMethodData.RadarOptions( + this.extraParams, this.session); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RadarOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RadarOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A Radar Session is a snapshot + * of the browser metadata and device details that help Radar make more accurate predictions + * on your payments. + */ + public Builder setSession(String session) { + this.session = session; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rechnung { + /** Required. Customer's date of birth */ + @SerializedName("dob") + Dob dob; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Rechnung(Dob dob, Map extraParams) { + this.dob = dob; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Dob dob; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Rechnung build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Rechnung( + this.dob, this.extraParams); + } + + /** Required. Customer's date of birth */ + public Builder setDob(PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob dob) { + this.dob = dob; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Rechnung#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Rechnung#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Dob { + /** Required. The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of birth. */ + @SerializedName("year") + Long year; + + private Dob(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Rechnung.Dob#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private RevolutPay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.RevolutPay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.RevolutPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RevolutPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RevolutPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SamsungPay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.SamsungPay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.SamsungPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.SamsungPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.SamsungPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Satispay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Satispay(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.Satispay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Satispay(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.Satispay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Satispay#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 + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. IBAN of the bank account. */ + @SerializedName("iban") + String iban; + + private SepaDebit(Map extraParams, String iban) { + this.extraParams = extraParams; + this.iban = iban; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String iban; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.SepaDebit build() { + return new PaymentIntentConfirmParams.PaymentMethodData.SepaDebit( + this.extraParams, this.iban); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.SepaDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.SepaDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. IBAN of the bank account. */ + public Builder setIban(String iban) { + this.iban = iban; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shopeepay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Shopeepay(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.Shopeepay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Shopeepay(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.Shopeepay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Shopeepay#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 + @EqualsAndHashCode(callSuper = false) + public static class Sofort { + /** + * Required. Two-letter ISO code representing the country the bank account is + * located in. + */ + @SerializedName("country") + Country country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sofort(Country country, Map extraParams) { + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Country country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Sofort build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Sofort( + this.country, this.extraParams); + } + + /** + * Required. Two-letter ISO code representing the country the bank account + * is located in. + */ + public Builder setCountry( + PaymentIntentConfirmParams.PaymentMethodData.Sofort.Country country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Sofort#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Sofort#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Country implements ApiRequestParams.EnumParam { + @SerializedName("AT") + AT("AT"), + + @SerializedName("BE") + BE("BE"), + + @SerializedName("DE") + DE("DE"), + + @SerializedName("ES") + ES("ES"), + + @SerializedName("IT") + IT("IT"), + + @SerializedName("NL") + NL("NL"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Country(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeBalance { + /** The connected account ID whose Stripe balance to use as the source of payment. */ + @SerializedName("account") + String account; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 source_type + * of the balance + */ + @SerializedName("source_type") + SourceType sourceType; + + private StripeBalance( + String account, Map extraParams, SourceType sourceType) { + this.account = account; + this.extraParams = extraParams; + this.sourceType = sourceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String account; + + private Map extraParams; + + private SourceType sourceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.StripeBalance build() { + return new PaymentIntentConfirmParams.PaymentMethodData.StripeBalance( + this.account, this.extraParams, this.sourceType); + } + + /** The connected account ID whose Stripe balance to use as the source of payment. */ + public Builder setAccount(String account) { + this.account = account; + 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.StripeBalance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.StripeBalance#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 source_type + * of the balance + */ + public Builder setSourceType( + PaymentIntentConfirmParams.PaymentMethodData.StripeBalance.SourceType sourceType) { + this.sourceType = sourceType; + return this; + } + } + + public enum SourceType implements ApiRequestParams.EnumParam { + @SerializedName("bank_account") + BANK_ACCOUNT("bank_account"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("fpx") + FPX("fpx"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SourceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Swish { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Swish(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Swish build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Swish(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Swish#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Swish#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Twint { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Twint(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Twint build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Twint(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Twint#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Twint#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount { + /** Account holder type: individual or company. */ + @SerializedName("account_holder_type") + AccountHolderType accountHolderType; + + /** Account number of the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Account type: checkings or savings. Defaults to checking if omitted. */ + @SerializedName("account_type") + AccountType accountType; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The ID of a Financial Connections Account to use as a payment method. */ + @SerializedName("financial_connections_account") + String financialConnectionsAccount; + + /** Routing number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + + private UsBankAccount( + AccountHolderType accountHolderType, + String accountNumber, + AccountType accountType, + Map extraParams, + String financialConnectionsAccount, + String routingNumber) { + this.accountHolderType = accountHolderType; + this.accountNumber = accountNumber; + this.accountType = accountType; + this.extraParams = extraParams; + this.financialConnectionsAccount = financialConnectionsAccount; + this.routingNumber = routingNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AccountHolderType accountHolderType; + + private String accountNumber; + + private AccountType accountType; + + private Map extraParams; + + private String financialConnectionsAccount; + + private String routingNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount build() { + return new PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount( + this.accountHolderType, + this.accountNumber, + this.accountType, + this.extraParams, + this.financialConnectionsAccount, + this.routingNumber); + } + + /** Account holder type: individual or company. */ + public Builder setAccountHolderType( + PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount.AccountHolderType + accountHolderType) { + this.accountHolderType = accountHolderType; + return this; + } + + /** Account number of the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Account type: checkings or savings. Defaults to checking if omitted. */ + public Builder setAccountType( + PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount.AccountType accountType) { + this.accountType = accountType; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The ID of a Financial Connections Account to use as a payment method. */ + public Builder setFinancialConnectionsAccount(String financialConnectionsAccount) { + this.financialConnectionsAccount = financialConnectionsAccount; + return this; + } + + /** Routing number of the bank account. */ + public Builder setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + } + + public enum AccountHolderType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("individual") + INDIVIDUAL("individual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountHolderType(String value) { + this.value = value; + } + } + + public enum AccountType implements ApiRequestParams.EnumParam { + @SerializedName("checking") + CHECKING("checking"), + + @SerializedName("savings") + SAVINGS("savings"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class WechatPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private WechatPay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.WechatPay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.WechatPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.WechatPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.WechatPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Zip { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Zip(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Zip build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Zip(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Zip#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Zip#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum AllowRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowRedisplay(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions { + /** + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the ACSS + * Debit payment method options. + */ + @SerializedName("acss_debit") + Object acssDebit; + + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + @SerializedName("affirm") + Object affirm; + + /** + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. + */ + @SerializedName("afterpay_clearpay") + Object afterpayClearpay; + + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + @SerializedName("alipay") + Object alipay; + + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + @SerializedName("alma") + Object alma; + + /** + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. + */ + @SerializedName("amazon_pay") + Object amazonPay; + + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the AU + * BECS Direct Debit payment method options. + */ + @SerializedName("au_becs_debit") + Object auBecsDebit; + + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the BACS + * Debit payment method options. + */ + @SerializedName("bacs_debit") + Object bacsDebit; + + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + @SerializedName("bancontact") + Object bancontact; + + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + @SerializedName("billie") + Object billie; + + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + @SerializedName("blik") + Object blik; + + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + @SerializedName("boleto") + Object boleto; + + /** Configuration for any card payments attempted on this PaymentIntent. */ + @SerializedName("card") + Object card; + + /** + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + @SerializedName("card_present") + Object cardPresent; + + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App + * Pay payment method options. + */ + @SerializedName("cashapp") + Object cashapp; + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + @SerializedName("crypto") + Object crypto; + + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the + * customer balance payment method options. + */ + @SerializedName("customer_balance") + Object customerBalance; + + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS payment + * method options. + */ + @SerializedName("eps") + Object eps; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment + * method options. + */ + @SerializedName("fpx") + Object fpx; + + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay + * payment method options. + */ + @SerializedName("giropay") + Object giropay; + + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + @SerializedName("gopay") + Object gopay; + + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay + * payment method options. + */ + @SerializedName("grabpay") + Object grabpay; + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the + * Indonesia Bank Transfer payment method options. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + @SerializedName("ideal") + Object ideal; + + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + @SerializedName("interac_present") + Object interacPresent; + + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the Kakao + * Pay payment method options. + */ + @SerializedName("kakao_pay") + Object kakaoPay; + + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + @SerializedName("klarna") + Object klarna; + + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini + * payment method options. + */ + @SerializedName("konbini") + Object konbini; + + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR Card + * payment method options. + */ + @SerializedName("kr_card") + Object krCard; + + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + @SerializedName("link") + Object link; + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + @SerializedName("mobilepay") + Object mobilepay; + + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + @SerializedName("multibanco") + Object multibanco; + + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the Naver + * Pay payment method options. + */ + @SerializedName("naver_pay") + Object naverPay; + + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about the + * NZ BECS Direct Debit payment method options. + */ + @SerializedName("nz_bank_account") + Object nzBankAccount; + + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + @SerializedName("oxxo") + Object oxxo; + + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + @SerializedName("p24") + Object p24; + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; + + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + @SerializedName("payco") + Object payco; + + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + @SerializedName("paynow") + Object paynow; + + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + @SerializedName("paypal") + Object paypal; + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Object payto; + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Object pix; + + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + @SerializedName("promptpay") + Object promptpay; + + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + @SerializedName("qris") + Object qris; + + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + @SerializedName("rechnung") + Object rechnung; + + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + @SerializedName("revolut_pay") + Object revolutPay; + + /** + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. + */ + @SerializedName("samsung_pay") + Object samsungPay; + + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + @SerializedName("satispay") + Object satispay; + + /** + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the SEPA + * Debit payment method options. + */ + @SerializedName("sepa_debit") + Object sepaDebit; + + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + @SerializedName("shopeepay") + Object shopeepay; + + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + @SerializedName("sofort") + Object sofort; + + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + @SerializedName("stripe_balance") + Object stripeBalance; + + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + @SerializedName("swish") + Object swish; + + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + @SerializedName("twint") + Object twint; + + /** + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the + * US bank account payment method options. + */ + @SerializedName("us_bank_account") + Object usBankAccount; + + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + @SerializedName("wechat_pay") + Object wechatPay; + + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment + * method options. + */ + @SerializedName("zip") + Object zip; + + private PaymentMethodOptions( + Object acssDebit, + Object affirm, + Object afterpayClearpay, + Object alipay, + Object alma, + Object amazonPay, + Object auBecsDebit, + Object bacsDebit, + Object bancontact, + Object billie, + Object blik, + Object boleto, + Object card, + Object cardPresent, + Object cashapp, + Object crypto, + Object customerBalance, + Object eps, + Map extraParams, + Object fpx, + Object giropay, + Object gopay, + Object grabpay, + Object idBankTransfer, + Object ideal, + Object interacPresent, + Object kakaoPay, + Object klarna, + Object konbini, + Object krCard, + Object link, + Object mbWay, + Object mobilepay, + Object multibanco, + Object naverPay, + Object nzBankAccount, + Object oxxo, + Object p24, + Object payByBank, + Object payco, + Object paynow, + Object paypal, + Object paypay, + Object payto, + Object pix, + Object promptpay, + Object qris, + Object rechnung, + Object revolutPay, + Object samsungPay, + Object satispay, + Object sepaDebit, + Object shopeepay, + Object sofort, + Object stripeBalance, + Object swish, + Object twint, + Object usBankAccount, + Object wechatPay, + Object zip) { + this.acssDebit = acssDebit; + this.affirm = affirm; + this.afterpayClearpay = afterpayClearpay; + this.alipay = alipay; + this.alma = alma; + this.amazonPay = amazonPay; + this.auBecsDebit = auBecsDebit; + this.bacsDebit = bacsDebit; + this.bancontact = bancontact; + this.billie = billie; + this.blik = blik; + this.boleto = boleto; + this.card = card; + this.cardPresent = cardPresent; + this.cashapp = cashapp; + this.crypto = crypto; + this.customerBalance = customerBalance; + this.eps = eps; + this.extraParams = extraParams; + this.fpx = fpx; + this.giropay = giropay; + this.gopay = gopay; + this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; + this.ideal = ideal; + this.interacPresent = interacPresent; + this.kakaoPay = kakaoPay; + this.klarna = klarna; + this.konbini = konbini; + this.krCard = krCard; + this.link = link; + this.mbWay = mbWay; + this.mobilepay = mobilepay; + this.multibanco = multibanco; + this.naverPay = naverPay; + this.nzBankAccount = nzBankAccount; + this.oxxo = oxxo; + this.p24 = p24; + this.payByBank = payByBank; + this.payco = payco; + this.paynow = paynow; + this.paypal = paypal; + this.paypay = paypay; + this.payto = payto; + this.pix = pix; + this.promptpay = promptpay; + this.qris = qris; + this.rechnung = rechnung; + this.revolutPay = revolutPay; + this.samsungPay = samsungPay; + this.satispay = satispay; + this.sepaDebit = sepaDebit; + this.shopeepay = shopeepay; + this.sofort = sofort; + this.stripeBalance = stripeBalance; + this.swish = swish; + this.twint = twint; + this.usBankAccount = usBankAccount; + this.wechatPay = wechatPay; + this.zip = zip; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object acssDebit; + + private Object affirm; + + private Object afterpayClearpay; + + private Object alipay; + + private Object alma; + + private Object amazonPay; + + private Object auBecsDebit; + + private Object bacsDebit; + + private Object bancontact; + + private Object billie; + + private Object blik; + + private Object boleto; + + private Object card; + + private Object cardPresent; + + private Object cashapp; + + private Object crypto; + + private Object customerBalance; + + private Object eps; + + private Map extraParams; + + private Object fpx; + + private Object giropay; + + private Object gopay; + + private Object grabpay; + + private Object idBankTransfer; + + private Object ideal; + + private Object interacPresent; + + private Object kakaoPay; + + private Object klarna; + + private Object konbini; + + private Object krCard; + + private Object link; + + private Object mbWay; + + private Object mobilepay; + + private Object multibanco; + + private Object naverPay; + + private Object nzBankAccount; + + private Object oxxo; + + private Object p24; + + private Object payByBank; + + private Object payco; + + private Object paynow; + + private Object paypal; + + private Object paypay; + + private Object payto; + + private Object pix; + + private Object promptpay; + + private Object qris; + + private Object rechnung; + + private Object revolutPay; + + private Object samsungPay; + + private Object satispay; + + private Object sepaDebit; + + private Object shopeepay; + + private Object sofort; + + private Object stripeBalance; + + private Object swish; + + private Object twint; + + private Object usBankAccount; + + private Object wechatPay; + + private Object zip; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions( + this.acssDebit, + this.affirm, + this.afterpayClearpay, + this.alipay, + this.alma, + this.amazonPay, + this.auBecsDebit, + this.bacsDebit, + this.bancontact, + this.billie, + this.blik, + this.boleto, + this.card, + this.cardPresent, + this.cashapp, + this.crypto, + this.customerBalance, + this.eps, + this.extraParams, + this.fpx, + this.giropay, + this.gopay, + this.grabpay, + this.idBankTransfer, + this.ideal, + this.interacPresent, + this.kakaoPay, + this.klarna, + this.konbini, + this.krCard, + this.link, + this.mbWay, + this.mobilepay, + this.multibanco, + this.naverPay, + this.nzBankAccount, + this.oxxo, + this.p24, + this.payByBank, + this.payco, + this.paynow, + this.paypal, + this.paypay, + this.payto, + this.pix, + this.promptpay, + this.qris, + this.rechnung, + this.revolutPay, + this.samsungPay, + this.satispay, + this.sepaDebit, + this.shopeepay, + this.sofort, + this.stripeBalance, + this.swish, + this.twint, + this.usBankAccount, + this.wechatPay, + this.zip); + } + + /** + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the + * ACSS Debit payment method options. + */ + public Builder setAcssDebit( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit acssDebit) { + this.acssDebit = acssDebit; + return this; + } + + /** + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the + * ACSS Debit payment method options. + */ + public Builder setAcssDebit(EmptyParam acssDebit) { + this.acssDebit = acssDebit; + return this; + } + + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + public Builder setAffirm(PaymentIntentConfirmParams.PaymentMethodOptions.Affirm affirm) { + this.affirm = affirm; + return this; + } + + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + public Builder setAffirm(EmptyParam affirm) { + this.affirm = affirm; + return this; + } + + /** + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. + */ + public Builder setAfterpayClearpay( + PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; + } + + /** + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. + */ + public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; + } + + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + public Builder setAlipay(PaymentIntentConfirmParams.PaymentMethodOptions.Alipay alipay) { + this.alipay = alipay; + return this; + } + + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + public Builder setAlipay(EmptyParam alipay) { + this.alipay = alipay; + return this; + } + + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + public Builder setAlma(PaymentIntentConfirmParams.PaymentMethodOptions.Alma alma) { + this.alma = alma; + return this; + } + + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + public Builder setAlma(EmptyParam alma) { + this.alma = alma; + return this; + } + + /** + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. + */ + public Builder setAmazonPay( + PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay amazonPay) { + this.amazonPay = amazonPay; + return this; + } + + /** + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. + */ + public Builder setAmazonPay(EmptyParam amazonPay) { + this.amazonPay = amazonPay; + return this; + } + + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the + * AU BECS Direct Debit payment method options. + */ + public Builder setAuBecsDebit( + PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) { + this.auBecsDebit = auBecsDebit; + return this; + } + + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the + * AU BECS Direct Debit payment method options. + */ + public Builder setAuBecsDebit(EmptyParam auBecsDebit) { + this.auBecsDebit = auBecsDebit; + return this; + } + + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. + */ + public Builder setBacsDebit( + PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit bacsDebit) { + this.bacsDebit = bacsDebit; + return this; + } + + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. + */ + public Builder setBacsDebit(EmptyParam bacsDebit) { + this.bacsDebit = bacsDebit; + return this; + } + + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + public Builder setBancontact( + PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact bancontact) { + this.bancontact = bancontact; + return this; + } + + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + public Builder setBancontact(EmptyParam bancontact) { + this.bancontact = bancontact; + return this; + } + + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + public Builder setBillie(PaymentIntentConfirmParams.PaymentMethodOptions.Billie billie) { + this.billie = billie; + return this; + } + + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + public Builder setBillie(EmptyParam billie) { + this.billie = billie; + return this; + } + + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + public Builder setBlik(PaymentIntentConfirmParams.PaymentMethodOptions.Blik blik) { + this.blik = blik; + return this; + } + + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + public Builder setBlik(EmptyParam blik) { + this.blik = blik; + return this; + } + + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + public Builder setBoleto(PaymentIntentConfirmParams.PaymentMethodOptions.Boleto boleto) { + this.boleto = boleto; + return this; + } + + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + public Builder setBoleto(EmptyParam boleto) { + this.boleto = boleto; + return this; + } + + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(PaymentIntentConfirmParams.PaymentMethodOptions.Card card) { + this.card = card; + return this; + } + + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(EmptyParam card) { + this.card = card; + return this; + } + + /** + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + public Builder setCardPresent( + PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent cardPresent) { + this.cardPresent = cardPresent; + return this; + } + + /** + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + public Builder setCardPresent(EmptyParam cardPresent) { + this.cardPresent = cardPresent; + return this; + } + + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash + * App Pay payment method options. + */ + public Builder setCashapp(PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp cashapp) { + this.cashapp = cashapp; + return this; + } + + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash + * App Pay payment method options. + */ + public Builder setCashapp(EmptyParam cashapp) { + this.cashapp = cashapp; + return this; + } + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(PaymentIntentConfirmParams.PaymentMethodOptions.Crypto crypto) { + this.crypto = crypto; + return this; + } + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(EmptyParam crypto) { + this.crypto = crypto; + return this; + } + + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about + * the customer balance payment method options. + */ + public Builder setCustomerBalance( + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance customerBalance) { + this.customerBalance = customerBalance; + return this; + } + + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about + * the customer balance payment method options. + */ + public Builder setCustomerBalance(EmptyParam customerBalance) { + this.customerBalance = customerBalance; + return this; + } + + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS + * payment method options. + */ + public Builder setEps(PaymentIntentConfirmParams.PaymentMethodOptions.Eps eps) { + this.eps = eps; + return this; + } + + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS + * payment method options. + */ + public Builder setEps(EmptyParam eps) { + this.eps = eps; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentConfirmParams.PaymentMethodOptions#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX + * payment method options. + */ + public Builder setFpx(PaymentIntentConfirmParams.PaymentMethodOptions.Fpx fpx) { + this.fpx = fpx; + return this; + } + + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX + * payment method options. + */ + public Builder setFpx(EmptyParam fpx) { + this.fpx = fpx; + return this; + } + + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the + * Giropay payment method options. + */ + public Builder setGiropay(PaymentIntentConfirmParams.PaymentMethodOptions.Giropay giropay) { + this.giropay = giropay; + return this; + } + + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the + * Giropay payment method options. + */ + public Builder setGiropay(EmptyParam giropay) { + this.giropay = giropay; + return this; + } + + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + public Builder setGopay(PaymentIntentConfirmParams.PaymentMethodOptions.Gopay gopay) { + this.gopay = gopay; + return this; + } + + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + public Builder setGopay(EmptyParam gopay) { + this.gopay = gopay; + return this; + } + + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the + * Grabpay payment method options. + */ + public Builder setGrabpay(PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay grabpay) { + this.grabpay = grabpay; + return this; + } + + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the + * Grabpay payment method options. + */ + public Builder setGrabpay(EmptyParam grabpay) { + this.grabpay = grabpay; + return this; + } + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer( + PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + public Builder setIdeal(PaymentIntentConfirmParams.PaymentMethodOptions.Ideal ideal) { + this.ideal = ideal; + return this; + } + + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + public Builder setIdeal(EmptyParam ideal) { + this.ideal = ideal; + return this; + } + + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about + * the Card Present payment method options. + */ + public Builder setInteracPresent( + PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent interacPresent) { + this.interacPresent = interacPresent; + return this; + } + + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about + * the Card Present payment method options. + */ + public Builder setInteracPresent(EmptyParam interacPresent) { + this.interacPresent = interacPresent; + return this; + } + + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the + * Kakao Pay payment method options. + */ + public Builder setKakaoPay( + PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay kakaoPay) { + this.kakaoPay = kakaoPay; + return this; + } + + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the + * Kakao Pay payment method options. + */ + public Builder setKakaoPay(EmptyParam kakaoPay) { + this.kakaoPay = kakaoPay; + return this; + } + + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(PaymentIntentConfirmParams.PaymentMethodOptions.Klarna klarna) { + this.klarna = klarna; + return this; + } + + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(EmptyParam klarna) { + this.klarna = klarna; + return this; + } + + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the + * Konbini payment method options. + */ + public Builder setKonbini(PaymentIntentConfirmParams.PaymentMethodOptions.Konbini konbini) { + this.konbini = konbini; + return this; + } + + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the + * Konbini payment method options. + */ + public Builder setKonbini(EmptyParam konbini) { + this.konbini = konbini; + return this; + } + + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR + * Card payment method options. + */ + public Builder setKrCard(PaymentIntentConfirmParams.PaymentMethodOptions.KrCard krCard) { + this.krCard = krCard; + return this; + } + + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR + * Card payment method options. + */ + public Builder setKrCard(EmptyParam krCard) { + this.krCard = krCard; + return this; + } + + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + public Builder setLink(PaymentIntentConfirmParams.PaymentMethodOptions.Link link) { + this.link = link; + return this; + } + + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + public Builder setLink(EmptyParam link) { + this.link = link; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + public Builder setMobilepay( + PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay mobilepay) { + this.mobilepay = mobilepay; + return this; + } + + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + public Builder setMobilepay(EmptyParam mobilepay) { + this.mobilepay = mobilepay; + return this; + } + + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + public Builder setMultibanco( + PaymentIntentConfirmParams.PaymentMethodOptions.Multibanco multibanco) { + this.multibanco = multibanco; + return this; + } + + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + public Builder setMultibanco(EmptyParam multibanco) { + this.multibanco = multibanco; + return this; + } + + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the + * Naver Pay payment method options. + */ + public Builder setNaverPay( + PaymentIntentConfirmParams.PaymentMethodOptions.NaverPay naverPay) { + this.naverPay = naverPay; + return this; + } + + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the + * Naver Pay payment method options. + */ + public Builder setNaverPay(EmptyParam naverPay) { + this.naverPay = naverPay; + return this; + } + + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about + * the NZ BECS Direct Debit payment method options. + */ + public Builder setNzBankAccount( + PaymentIntentConfirmParams.PaymentMethodOptions.NzBankAccount nzBankAccount) { + this.nzBankAccount = nzBankAccount; + return this; + } + + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about + * the NZ BECS Direct Debit payment method options. + */ + public Builder setNzBankAccount(EmptyParam nzBankAccount) { + this.nzBankAccount = nzBankAccount; + return this; + } + + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + public Builder setOxxo(PaymentIntentConfirmParams.PaymentMethodOptions.Oxxo oxxo) { + this.oxxo = oxxo; + return this; + } + + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + public Builder setOxxo(EmptyParam oxxo) { + this.oxxo = oxxo; + return this; + } + + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + public Builder setP24(PaymentIntentConfirmParams.PaymentMethodOptions.P24 p24) { + this.p24 = p24; + return this; + } + + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + public Builder setP24(EmptyParam p24) { + this.p24 = p24; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + public Builder setPayco(PaymentIntentConfirmParams.PaymentMethodOptions.Payco payco) { + this.payco = payco; + return this; + } + + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + public Builder setPayco(EmptyParam payco) { + this.payco = payco; + return this; + } + + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + public Builder setPaynow(PaymentIntentConfirmParams.PaymentMethodOptions.Paynow paynow) { + this.paynow = paynow; + return this; + } + + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + public Builder setPaynow(EmptyParam paynow) { + this.paynow = paynow; + return this; + } + + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodOptions.Paypal paypal) { + this.paypal = paypal; + return this; + } + + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + public Builder setPaypal(EmptyParam paypal) { + this.paypal = paypal; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(PaymentIntentConfirmParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(PaymentIntentConfirmParams.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + public Builder setPromptpay( + PaymentIntentConfirmParams.PaymentMethodOptions.Promptpay promptpay) { + this.promptpay = promptpay; + return this; + } + + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + public Builder setPromptpay(EmptyParam promptpay) { + this.promptpay = promptpay; + return this; + } + + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + public Builder setQris(PaymentIntentConfirmParams.PaymentMethodOptions.Qris qris) { + this.qris = qris; + return this; + } + + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + public Builder setQris(EmptyParam qris) { + this.qris = qris; + return this; + } + + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + public Builder setRechnung( + PaymentIntentConfirmParams.PaymentMethodOptions.Rechnung rechnung) { + this.rechnung = rechnung; + return this; + } + + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + public Builder setRechnung(EmptyParam rechnung) { + this.rechnung = rechnung; + return this; + } + + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + public Builder setRevolutPay( + PaymentIntentConfirmParams.PaymentMethodOptions.RevolutPay revolutPay) { + this.revolutPay = revolutPay; + return this; + } + + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + public Builder setRevolutPay(EmptyParam revolutPay) { + this.revolutPay = revolutPay; + return this; + } + + /** + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. + */ + public Builder setSamsungPay( + PaymentIntentConfirmParams.PaymentMethodOptions.SamsungPay samsungPay) { + this.samsungPay = samsungPay; + return this; + } + + /** + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. + */ + public Builder setSamsungPay(EmptyParam samsungPay) { + this.samsungPay = samsungPay; + return this; + } + + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + public Builder setSatispay( + PaymentIntentConfirmParams.PaymentMethodOptions.Satispay satispay) { + this.satispay = satispay; + return this; + } + + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + public Builder setSatispay(EmptyParam satispay) { + this.satispay = satispay; + return this; + } + + /** + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the + * SEPA Debit payment method options. + */ + public Builder setSepaDebit( + PaymentIntentConfirmParams.PaymentMethodOptions.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; + return this; + } + + /** + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the + * SEPA Debit payment method options. + */ + public Builder setSepaDebit(EmptyParam sepaDebit) { + this.sepaDebit = sepaDebit; + return this; + } + + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + public Builder setShopeepay( + PaymentIntentConfirmParams.PaymentMethodOptions.Shopeepay shopeepay) { + this.shopeepay = shopeepay; + return this; + } + + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + public Builder setShopeepay(EmptyParam shopeepay) { + this.shopeepay = shopeepay; + return this; + } + + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + public Builder setSofort(PaymentIntentConfirmParams.PaymentMethodOptions.Sofort sofort) { + this.sofort = sofort; + return this; + } + + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + public Builder setSofort(EmptyParam sofort) { + this.sofort = sofort; + return this; + } + + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + public Builder setStripeBalance( + PaymentIntentConfirmParams.PaymentMethodOptions.StripeBalance stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } + + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + public Builder setStripeBalance(EmptyParam stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } + + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + public Builder setSwish(PaymentIntentConfirmParams.PaymentMethodOptions.Swish swish) { + this.swish = swish; + return this; + } + + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + public Builder setSwish(EmptyParam swish) { + this.swish = swish; + return this; + } + + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + public Builder setTwint(PaymentIntentConfirmParams.PaymentMethodOptions.Twint twint) { + this.twint = twint; + return this; + } + + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + public Builder setTwint(EmptyParam twint) { + this.twint = twint; + return this; + } + + /** + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about + * the US bank account payment method options. + */ + public Builder setUsBankAccount( + PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount usBankAccount) { + this.usBankAccount = usBankAccount; + return this; + } + + /** + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about + * the US bank account payment method options. + */ + public Builder setUsBankAccount(EmptyParam usBankAccount) { + this.usBankAccount = usBankAccount; + return this; + } + + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + public Builder setWechatPay( + PaymentIntentConfirmParams.PaymentMethodOptions.WechatPay wechatPay) { + this.wechatPay = wechatPay; + return this; + } + + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + public Builder setWechatPay(EmptyParam wechatPay) { + this.wechatPay = wechatPay; + return this; + } + + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip + * payment method options. + */ + public Builder setZip(PaymentIntentConfirmParams.PaymentMethodOptions.Zip zip) { + this.zip = zip; + return this; + } + + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip + * payment method options. + */ + public Builder setZip(EmptyParam zip) { + this.zip = zip; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + /** Bank account verification method. */ + @SerializedName("verification_method") + VerificationMethod verificationMethod; + + private AcssDebit( + Map extraParams, + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, + VerificationMethod verificationMethod) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; + this.verificationMethod = verificationMethod; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private String targetDate; + + private VerificationMethod verificationMethod; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit( + this.extraParams, + this.mandateOptions, + this.setupFutureUsage, + this.targetDate, + this.verificationMethod); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** Bank account verification method. */ + public Builder setVerificationMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod + verificationMethod) { + this.verificationMethod = verificationMethod; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + @SerializedName("custom_mandate_url") + Object customMandateUrl; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + @SerializedName("interval_description") + String intervalDescription; + + /** Payment schedule for the mandate. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** Transaction type of the mandate. */ + @SerializedName("transaction_type") + TransactionType transactionType; + + private MandateOptions( + Object customMandateUrl, + Map extraParams, + String intervalDescription, + PaymentSchedule paymentSchedule, + TransactionType transactionType) { + this.customMandateUrl = customMandateUrl; + this.extraParams = extraParams; + this.intervalDescription = intervalDescription; + this.paymentSchedule = paymentSchedule; + this.transactionType = transactionType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object customMandateUrl; + + private Map extraParams; + + private String intervalDescription; + + private PaymentSchedule paymentSchedule; + + private TransactionType transactionType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions( + this.customMandateUrl, + this.extraParams, + this.intervalDescription, + this.paymentSchedule, + this.transactionType); + } + + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + public Builder setCustomMandateUrl(String customMandateUrl) { + this.customMandateUrl = customMandateUrl; + return this; + } + + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + public Builder setCustomMandateUrl(EmptyParam customMandateUrl) { + this.customMandateUrl = customMandateUrl; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + public Builder setIntervalDescription(String intervalDescription) { + this.intervalDescription = intervalDescription; + return this; + } + + /** Payment schedule for the mandate. */ + public Builder setPaymentSchedule( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** Transaction type of the mandate. */ + public Builder setTransactionType( + PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions + .TransactionType + transactionType) { + this.transactionType = transactionType; + return this; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("combined") + COMBINED("combined"), + + @SerializedName("interval") + INTERVAL("interval"), + + @SerializedName("sporadic") + SPORADIC("sporadic"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("personal") + PERSONAL("personal"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionType(String value) { + this.value = value; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + + public enum VerificationMethod implements ApiRequestParams.EnumParam { + @SerializedName("automatic") + AUTOMATIC("automatic"), + + @SerializedName("instant") + INSTANT("instant"), + + @SerializedName("microdeposits") + MICRODEPOSITS("microdeposits"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VerificationMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affirm { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Preferred language of the Affirm authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + String preferredLocale; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Affirm( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + String preferredLocale, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.preferredLocale = preferredLocale; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private String preferredLocale; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Affirm build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Affirm( + this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Affirm#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Affirm#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale(String preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Affirm.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpay { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. + */ + @SerializedName("reference") + String reference; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private AfterpayClearpay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + String reference, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.reference = reference; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private String reference; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay( + this.captureMethod, this.extraParams, this.reference, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alipay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Alipay(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Alipay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Alipay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Alipay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alma { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Alma build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Alma( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alma#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alma#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 CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private AmazonPay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + private AuBecsDebit( + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private String targetDate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit( + this.extraParams, this.setupFutureUsage, this.targetDate); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit.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; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * 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; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + private BacsDebit( + Map extraParams, + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private String targetDate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit( + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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.PaymentMethodOptions.BacsDebit#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.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; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special characters: + * '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + @SerializedName("reference_prefix") + Object referencePrefix; + + private MandateOptions(Map extraParams, Object referencePrefix) { + this.extraParams = extraParams; + this.referencePrefix = referencePrefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object referencePrefix; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions( + this.extraParams, this.referencePrefix); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special + * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + public Builder setReferencePrefix(String referencePrefix) { + this.referencePrefix = referencePrefix; + return this; + } + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special + * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + public Builder setReferencePrefix(EmptyParam referencePrefix) { + this.referencePrefix = referencePrefix; + return this; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Bancontact { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ + @SerializedName("preferred_language") + PreferredLanguage preferredLanguage; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Bancontact( + Map extraParams, + PreferredLanguage preferredLanguage, + ApiRequestParams.EnumParam setupFutureUsage) { + this.extraParams = extraParams; + this.preferredLanguage = preferredLanguage; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PreferredLanguage preferredLanguage; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact( + this.extraParams, this.preferredLanguage, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected + * to. + */ + public Builder setPreferredLanguage( + PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact.PreferredLanguage + preferredLanguage) { + this.preferredLanguage = preferredLanguage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Bancontact.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum PreferredLanguage implements ApiRequestParams.EnumParam { + @SerializedName("de") + DE("de"), + + @SerializedName("en") + EN("en"), + + @SerializedName("fr") + FR("fr"), + + @SerializedName("nl") + NL("nl"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLanguage(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billie { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Billie build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Billie( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Billie#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Billie#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 CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Blik { + /** + * The 6-digit BLIK code that a customer has generated using their banking application. Can + * only be set on confirmation. + */ + @SerializedName("code") + String code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Blik( + String code, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.code = code; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String code; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Blik build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Blik( + this.code, this.extraParams, this.setupFutureUsage); + } + + /** + * The 6-digit BLIK code that a customer has generated using their banking application. Can + * only be set on confirmation. + */ + public Builder setCode(String code) { + this.code = code; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Blik.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Boleto { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a + * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will + * expire on Wednesday at 23:59 America/Sao_Paulo time. + */ + @SerializedName("expires_after_days") + Long expiresAfterDays; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Boleto( + Long expiresAfterDays, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.expiresAfterDays = expiresAfterDays; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfterDays; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Boleto build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Boleto( + this.expiresAfterDays, this.extraParams, this.setupFutureUsage); + } + + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a + * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will + * expire on Wednesday at 23:59 America/Sao_Paulo time. + */ + public Builder setExpiresAfterDays(Long expiresAfterDays) { + this.expiresAfterDays = expiresAfterDays; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Boleto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Boleto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, the + * CVC value will be verified during the card payment attempt. This parameter can only be + * provided during confirmation. + */ + @SerializedName("cvc_token") + String cvcToken; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Installment configuration for payments attempted on this PaymentIntent. + * + *

For more information, see the installments integration guide. + */ + @SerializedName("installments") + Installments installments; + + /** Configuration options for setting up an eMandate for cards issued in India. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail + * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided + * during confirmation. + */ + @SerializedName("moto") + Boolean moto; + + /** + * Selected network to process this PaymentIntent on. Depends on the available networks of the + * card attached to the PaymentIntent. Can be only set confirm-time. + */ + @SerializedName("network") + Network network; + + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + @SerializedName("request_decremental_authorization") + RequestDecrementalAuthorization requestDecrementalAuthorization; + + /** + * Request ability to capture beyond the standard + * authorization validity window for this PaymentIntent. + */ + @SerializedName("request_extended_authorization") + RequestExtendedAuthorization requestExtendedAuthorization; + + /** + * Request ability to increment the + * authorization for this PaymentIntent. + */ + @SerializedName("request_incremental_authorization") + RequestIncrementalAuthorization requestIncrementalAuthorization; + + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + @SerializedName("request_multicapture") + RequestMulticapture requestMulticapture; + + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + @SerializedName("request_overcapture") + RequestOvercapture requestOvercapture; + + /** Request partial authorization on this PaymentIntent. */ + @SerializedName("request_partial_authorization") + RequestPartialAuthorization requestPartialAuthorization; + + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your + * customers for authentication based on risk level and other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. If not provided, this value defaults to {@code automatic}. Read our + * guide on manually + * requesting 3D Secure for more information on how this configuration interacts with + * Radar and our SCA Engine. + */ + @SerializedName("request_three_d_secure") + RequestThreeDSecure requestThreeDSecure; + + /** + * When enabled, using a card that is attached to a customer will require the CVC to be + * provided again (i.e. using the cvc_token parameter). + */ + @SerializedName("require_cvc_recollection") + Boolean requireCvcRecollection; + + /** + * 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; + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor + * that’s set on the account to form the complete statement descriptor. Maximum 22 characters. + * On card statements, the concatenation of both prefix and suffix (including + * separators) will appear truncated to 22 characters. + */ + @SerializedName("statement_descriptor_suffix_kana") + Object statementDescriptorSuffixKana; + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 + * characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + @SerializedName("statement_descriptor_suffix_kanji") + Object statementDescriptorSuffixKanji; + + /** + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. + */ + @SerializedName("statement_details") + Object statementDetails; + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. + */ + @SerializedName("three_d_secure") + ThreeDSecure threeDSecure; + + private Card( + ApiRequestParams.EnumParam captureMethod, + String cvcToken, + Map extraParams, + Installments installments, + MandateOptions mandateOptions, + Boolean moto, + Network network, + RequestDecrementalAuthorization requestDecrementalAuthorization, + RequestExtendedAuthorization requestExtendedAuthorization, + RequestIncrementalAuthorization requestIncrementalAuthorization, + RequestMulticapture requestMulticapture, + RequestOvercapture requestOvercapture, + RequestPartialAuthorization requestPartialAuthorization, + RequestThreeDSecure requestThreeDSecure, + Boolean requireCvcRecollection, + ApiRequestParams.EnumParam setupFutureUsage, + Object statementDescriptorSuffixKana, + Object statementDescriptorSuffixKanji, + Object statementDetails, + ThreeDSecure threeDSecure) { + this.captureMethod = captureMethod; + this.cvcToken = cvcToken; + this.extraParams = extraParams; + this.installments = installments; + this.mandateOptions = mandateOptions; + this.moto = moto; + this.network = network; + this.requestDecrementalAuthorization = requestDecrementalAuthorization; + this.requestExtendedAuthorization = requestExtendedAuthorization; + this.requestIncrementalAuthorization = requestIncrementalAuthorization; + this.requestMulticapture = requestMulticapture; + this.requestOvercapture = requestOvercapture; + this.requestPartialAuthorization = requestPartialAuthorization; + this.requestThreeDSecure = requestThreeDSecure; + this.requireCvcRecollection = requireCvcRecollection; + this.setupFutureUsage = setupFutureUsage; + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.statementDetails = statementDetails; + this.threeDSecure = threeDSecure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private String cvcToken; + + private Map extraParams; + + private Installments installments; + + private MandateOptions mandateOptions; + + private Boolean moto; + + private Network network; + + private RequestDecrementalAuthorization requestDecrementalAuthorization; + + private RequestExtendedAuthorization requestExtendedAuthorization; + + private RequestIncrementalAuthorization requestIncrementalAuthorization; + + private RequestMulticapture requestMulticapture; + + private RequestOvercapture requestOvercapture; + + private RequestPartialAuthorization requestPartialAuthorization; + + private RequestThreeDSecure requestThreeDSecure; + + private Boolean requireCvcRecollection; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private Object statementDescriptorSuffixKana; + + private Object statementDescriptorSuffixKanji; + + private Object statementDetails; + + private ThreeDSecure threeDSecure; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card( + this.captureMethod, + this.cvcToken, + this.extraParams, + this.installments, + this.mandateOptions, + this.moto, + this.network, + this.requestDecrementalAuthorization, + this.requestExtendedAuthorization, + this.requestIncrementalAuthorization, + this.requestMulticapture, + this.requestOvercapture, + this.requestPartialAuthorization, + this.requestThreeDSecure, + this.requireCvcRecollection, + this.setupFutureUsage, + this.statementDescriptorSuffixKana, + this.statementDescriptorSuffixKanji, + this.statementDetails, + this.threeDSecure); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, + * the CVC value will be verified during the card payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setCvcToken(String cvcToken) { + this.cvcToken = cvcToken; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Installment configuration for payments attempted on this PaymentIntent. + * + *

For more information, see the installments integration guide. + */ + public Builder setInstallments( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments installments) { + this.installments = installments; + return this; + } + + /** Configuration options for setting up an eMandate for cards issued in India. */ + public Builder setMandateOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail + * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided + * during confirmation. + */ + public Builder setMoto(Boolean moto) { + this.moto = moto; + return this; + } + + /** + * Selected network to process this PaymentIntent on. Depends on the available networks of + * the card attached to the PaymentIntent. Can be only set confirm-time. + */ + public Builder setNetwork( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.Network network) { + this.network = network; + return this; + } + + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + public Builder setRequestDecrementalAuthorization( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization + requestDecrementalAuthorization) { + this.requestDecrementalAuthorization = requestDecrementalAuthorization; + return this; + } + + /** + * Request ability to capture beyond the + * standard authorization validity window for this PaymentIntent. + */ + public Builder setRequestExtendedAuthorization( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestExtendedAuthorization + requestExtendedAuthorization) { + this.requestExtendedAuthorization = requestExtendedAuthorization; + return this; + } + + /** + * Request ability to increment the + * authorization for this PaymentIntent. + */ + public Builder setRequestIncrementalAuthorization( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization + requestIncrementalAuthorization) { + this.requestIncrementalAuthorization = requestIncrementalAuthorization; + return this; + } + + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + public Builder setRequestMulticapture( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestMulticapture + requestMulticapture) { + this.requestMulticapture = requestMulticapture; + return this; + } + + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + public Builder setRequestOvercapture( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestOvercapture + requestOvercapture) { + this.requestOvercapture = requestOvercapture; + return this; + } + + /** Request partial authorization on this PaymentIntent. */ + public Builder setRequestPartialAuthorization( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestPartialAuthorization + requestPartialAuthorization) { + this.requestPartialAuthorization = requestPartialAuthorization; + return this; + } + + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your + * customers for authentication based on risk level and other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. If not provided, this value defaults to {@code automatic}. Read our + * guide on manually + * requesting 3D Secure for more information on how this configuration interacts with + * Radar and our SCA Engine. + */ + public Builder setRequestThreeDSecure( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.RequestThreeDSecure + requestThreeDSecure) { + this.requestThreeDSecure = requestThreeDSecure; + return this; + } + + /** + * When enabled, using a card that is attached to a customer will require the CVC to be + * provided again (i.e. using the cvc_token parameter). + */ + public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { + this.requireCvcRecollection = requireCvcRecollection; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.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; + } + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 22 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 22 characters. + */ + public Builder setStatementDescriptorSuffixKana(String statementDescriptorSuffixKana) { + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + return this; + } + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 22 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 22 characters. + */ + public Builder setStatementDescriptorSuffixKana(EmptyParam statementDescriptorSuffixKana) { + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + return this; + } + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 17 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + public Builder setStatementDescriptorSuffixKanji(String statementDescriptorSuffixKanji) { + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + return this; + } + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 17 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + public Builder setStatementDescriptorSuffixKanji( + EmptyParam statementDescriptorSuffixKanji) { + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + return this; + } + + /** + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. + */ + public Builder setStatementDetails( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails + statementDetails) { + this.statementDetails = statementDetails; + return this; + } + + /** + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. + */ + public Builder setStatementDetails(EmptyParam statementDetails) { + this.statementDetails = statementDetails; + return this; + } + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. + */ + public Builder setThreeDSecure( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Installments { + /** + * Setting to true enables installments for this PaymentIntent. This will cause the response + * to contain a list of available installment plans. Setting to false will prevent any + * selected plan from applying to a charge. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The selected installment plan to use for this payment attempt. This parameter can only be + * provided during confirmation. + */ + @SerializedName("plan") + Object plan; + + private Installments(Boolean enabled, Map extraParams, Object plan) { + this.enabled = enabled; + this.extraParams = extraParams; + this.plan = plan; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Object plan; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments( + this.enabled, this.extraParams, this.plan); + } + + /** + * Setting to true enables installments for this PaymentIntent. This will cause the + * response to contain a list of available installment plans. Setting to false will + * prevent any selected plan from applying to a charge. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The selected installment plan to use for this payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setPlan( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan plan) { + this.plan = plan; + return this; + } + + /** + * The selected installment plan to use for this payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setPlan(EmptyParam plan) { + this.plan = plan; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Plan { + /** + * For {@code fixed_count} installment plans, this is required. It represents the number + * of installment payments your customer will make to their credit card. + */ + @SerializedName("count") + Long count; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * For {@code fixed_count} installment plans, this is required. It represents the interval + * between installment payments your customer will make to their credit card. One of + * {@code month}. + */ + @SerializedName("interval") + Interval interval; + + /** + * Required. Type of installment plan, one of {@code fixed_count}, {@code + * bonus}, or {@code revolving}. + */ + @SerializedName("type") + Type type; + + private Plan(Long count, Map extraParams, Interval interval, Type type) { + this.count = count; + this.extraParams = extraParams; + this.interval = interval; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long count; + + private Map extraParams; + + private Interval interval; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan( + this.count, this.extraParams, this.interval, this.type); + } + + /** + * For {@code fixed_count} installment plans, this is required. It represents the number + * of installment payments your customer will make to their credit card. + */ + public Builder setCount(Long count) { + this.count = count; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * For {@code fixed_count} installment plans, this is required. It represents the + * interval between installment payments your customer will make to their credit card. + * One of {@code month}. + */ + public Builder setInterval( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ + public Builder setType( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { + this.type = type; + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("month") + MONTH("month"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), + + @SerializedName("fixed_count") + FIXED_COUNT("fixed_count"), + + @SerializedName("revolving") + REVOLVING("revolving"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Required. Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, the + * {@code amount} param refers to the exact amount to be charged in future payments. If + * {@code maximum}, the amount charged can be up to the value passed for the {@code amount} + * param. + */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + String description; + + /** + * End date of the mandate or subscription. If not provided, the mandate will be active + * until canceled. If provided, end date should be after start date. + */ + @SerializedName("end_date") + Long endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Specifies payment frequency. One of {@code day}, {@code week}, + * {@code month}, {@code year}, or {@code sporadic}. + */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals between payments. For example, {@code interval=month} and {@code + * interval_count=3} indicates one payment every three months. Maximum of one year interval + * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code + * interval=sporadic}. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Required. Unique identifier for the mandate or subscription. */ + @SerializedName("reference") + String reference; + + /** + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. + */ + @SerializedName("start_date") + Long startDate; + + /** Specifies the type of mandates supported. Possible values are {@code india}. */ + @SerializedName("supported_types") + List + supportedTypes; + + private MandateOptions( + Long amount, + AmountType amountType, + String description, + Long endDate, + Map extraParams, + Interval interval, + Long intervalCount, + String reference, + Long startDate, + List + supportedTypes) { + this.amount = amount; + this.amountType = amountType; + this.description = description; + this.endDate = endDate; + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.reference = reference; + this.startDate = startDate; + this.supportedTypes = supportedTypes; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountType amountType; + + private String description; + + private Long endDate; + + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String reference; + + private Long startDate; + + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> + supportedTypes; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions( + this.amount, + this.amountType, + this.description, + this.endDate, + this.extraParams, + this.interval, + this.intervalCount, + this.reference, + this.startDate, + this.supportedTypes); + } + + /** Required. Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, + * the {@code amount} param refers to the exact amount to be charged in future payments. + * If {@code maximum}, the amount charged can be up to the value passed for the {@code + * amount} param. + */ + public Builder setAmountType( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * End date of the mandate or subscription. If not provided, the mandate will be active + * until canceled. If provided, end date should be after start date. + */ + public Builder setEndDate(Long endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Specifies payment frequency. One of {@code day}, {@code + * week}, {@code month}, {@code year}, or {@code sporadic}. + */ + public Builder setInterval( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals between payments. For example, {@code interval=month} and + * {@code interval_count=3} indicates one payment every three months. Maximum of one year + * interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when + * {@code interval=sporadic}. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Required. Unique identifier for the mandate or subscription. */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. + */ + public Builder setStartDate(Long startDate) { + this.startDate = startDate; + return this; + } + + /** + * Add an element to `supportedTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for + * the field documentation. + */ + public Builder addSupportedType( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.SupportedType + element) { + if (this.supportedTypes == null) { + this.supportedTypes = new ArrayList<>(); + } + this.supportedTypes.add(element); + return this; + } + + /** + * Add all elements to `supportedTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for + * the field documentation. + */ + public Builder addAllSupportedType( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions + .SupportedType> + elements) { + if (this.supportedTypes == null) { + this.supportedTypes = new ArrayList<>(); + } + this.supportedTypes.addAll(elements); + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("sporadic") + SPORADIC("sporadic"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + + public enum SupportedType implements ApiRequestParams.EnumParam { + @SerializedName("india") + INDIA("india"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SupportedType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StatementDetails { + /** Please pass in an address that is within your Stripe user account country. */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Phone number (e.g., a toll-free number that customers can call). */ + @SerializedName("phone") + String phone; + + private StatementDetails(Address address, Map extraParams, String phone) { + this.address = address; + this.extraParams = extraParams; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails( + this.address, this.extraParams, this.phone); + } + + /** Please pass in an address that is within your Stripe user account country. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails.Address + address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Phone number (e.g., a toll-free number that customers can call). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the 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.PaymentMethodOptions.Card.StatementDetails.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails + .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.PaymentMethodOptions.Card.StatementDetails.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.PaymentMethodOptions.Card.StatementDetails.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the 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 + @EqualsAndHashCode(callSuper = false) + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + @SerializedName("cryptogram") + String cryptogram; + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the + * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + @SerializedName("requestor_challenge_indicator") + String requestorChallengeIndicator; + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + String transactionId; + + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; + + private ThreeDSecure( + AresTransStatus aresTransStatus, + String cryptogram, + ElectronicCommerceIndicator electronicCommerceIndicator, + ExemptionIndicator exemptionIndicator, + Map extraParams, + NetworkOptions networkOptions, + String requestorChallengeIndicator, + String transactionId, + Version version) { + this.aresTransStatus = aresTransStatus; + this.cryptogram = cryptogram; + this.electronicCommerceIndicator = electronicCommerceIndicator; + this.exemptionIndicator = exemptionIndicator; + this.extraParams = extraParams; + this.networkOptions = networkOptions; + this.requestorChallengeIndicator = requestorChallengeIndicator; + this.transactionId = transactionId; + this.version = version; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AresTransStatus aresTransStatus; + + private String cryptogram; + + private ElectronicCommerceIndicator electronicCommerceIndicator; + + private ExemptionIndicator exemptionIndicator; + + private Map extraParams; + + private NetworkOptions networkOptions; + + private String requestorChallengeIndicator; + + private String transactionId; + + private Version version; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure( + this.aresTransStatus, + this.cryptogram, + this.electronicCommerceIndicator, + this.exemptionIndicator, + this.extraParams, + this.networkOptions, + this.requestorChallengeIndicator, + this.transactionId, + this.version); + } + + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + public Builder setAresTransStatus( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus + aresTransStatus) { + this.aresTransStatus = aresTransStatus; + return this; + } + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + public Builder setCryptogram(String cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + public Builder setExemptionIndicator( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.ExemptionIndicator + exemptionIndicator) { + this.exemptionIndicator = exemptionIndicator; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + public Builder setNetworkOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + networkOptions) { + this.networkOptions = networkOptions; + return this; + } + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + public Builder setTransactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** Required. The version of 3D Secure that was performed. */ + public Builder setVersion( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CartesBancaires cartesBancaires; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } + + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + String cbExemption; + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + @SerializedName("cb_score") + Long cbScore; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CartesBancaires( + CbAvalgo cbAvalgo, + String cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CbAvalgo cbAvalgo; + + private String cbExemption; + + private Long cbScore; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions.CartesBancaires + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions.CartesBancaires( + this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + } + + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + public Builder setCbAvalgo( + PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires.CbAvalgo + cbAvalgo) { + this.cbAvalgo = cbAvalgo; + return this; + } + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(String cbExemption) { + this.cbExemption = cbExemption; + return this; + } + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), + + @SerializedName("1") + N1("1"), + + @SerializedName("2") + N2("2"), + + @SerializedName("3") + N3("3"), + + @SerializedName("4") + N4("4"), + + @SerializedName("A") + A("A"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CbAvalgo(String value) { + this.value = value; + } + } + } + } + + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), + + @SerializedName("C") + C("C"), + + @SerializedName("I") + I("I"), + + @SerializedName("N") + N("N"), + + @SerializedName("R") + R("R"), + + @SerializedName("U") + U("U"), + + @SerializedName("Y") + Y("Y"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AresTransStatus(String value) { + this.value = value; + } + } + + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), + + @SerializedName("02") + N02("02"), + + @SerializedName("05") + N05("05"), + + @SerializedName("06") + N06("06"), + + @SerializedName("07") + N07("07"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } + + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExemptionIndicator(String value) { + this.value = value; + } + } + + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), + + @SerializedName("2.1.0") + N2__1__0("2.1.0"), + + @SerializedName("2.2.0") + N2__2__0("2.2.0"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Version(String value) { + this.value = value; + } + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum Network implements ApiRequestParams.EnumParam { + @SerializedName("amex") + AMEX("amex"), + + @SerializedName("cartes_bancaires") + CARTES_BANCAIRES("cartes_bancaires"), + + @SerializedName("diners") + DINERS("diners"), + + @SerializedName("discover") + DISCOVER("discover"), + + @SerializedName("eftpos_au") + EFTPOS_AU("eftpos_au"), + + @SerializedName("girocard") + GIROCARD("girocard"), + + @SerializedName("interac") + INTERAC("interac"), + + @SerializedName("jcb") + JCB("jcb"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mastercard") + MASTERCARD("mastercard"), + + @SerializedName("unionpay") + UNIONPAY("unionpay"), + + @SerializedName("unknown") + UNKNOWN("unknown"), + + @SerializedName("visa") + VISA("visa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Network(String value) { + this.value = value; + } + } + + public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestDecrementalAuthorization(String value) { + this.value = value; + } + } + + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestExtendedAuthorization(String value) { + this.value = value; + } + } + + public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestIncrementalAuthorization(String value) { + this.value = value; + } + } + + public enum RequestMulticapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestMulticapture(String value) { + this.value = value; + } + } + + public enum RequestOvercapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestOvercapture(String value) { + this.value = value; + } + } + + public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestPartialAuthorization(String value) { + this.value = value; + } + } + + public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { + @SerializedName("any") + ANY("any"), + + @SerializedName("automatic") + AUTOMATIC("automatic"), + + @SerializedName("challenge") + CHALLENGE("challenge"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestThreeDSecure(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Request ability to capture this payment beyond the standard authorization + * validity window. + */ + @SerializedName("request_extended_authorization") + Boolean requestExtendedAuthorization; + + /** + * Request ability to increment + * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported + * in the Confirm response + * to verify support. + */ + @SerializedName("request_incremental_authorization_support") + Boolean requestIncrementalAuthorizationSupport; + + /** + * Network routing priority on co-branded EMV cards supporting domestic debit and + * international card schemes. + */ + @SerializedName("routing") + Routing routing; + + private CardPresent( + CaptureMethod captureMethod, + Map extraParams, + Boolean requestExtendedAuthorization, + Boolean requestIncrementalAuthorizationSupport, + Routing routing) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.requestExtendedAuthorization = requestExtendedAuthorization; + this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; + this.routing = routing; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + private Boolean requestExtendedAuthorization; + + private Boolean requestIncrementalAuthorizationSupport; + + private Routing routing; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent( + this.captureMethod, + this.extraParams, + this.requestExtendedAuthorization, + this.requestIncrementalAuthorizationSupport, + this.routing); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Request ability to capture this payment beyond the standard authorization + * validity window. + */ + public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { + this.requestExtendedAuthorization = requestExtendedAuthorization; + return this; + } + + /** + * Request ability to increment + * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported + * in the Confirm response + * to verify support. + */ + public Builder setRequestIncrementalAuthorizationSupport( + Boolean requestIncrementalAuthorizationSupport) { + this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; + return this; + } + + /** + * Network routing priority on co-branded EMV cards supporting domestic debit and + * international card schemes. + */ + public Builder setRouting( + PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing routing) { + this.routing = routing; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Routing { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Routing requested priority. */ + @SerializedName("requested_priority") + RequestedPriority requestedPriority; + + private Routing(Map extraParams, RequestedPriority requestedPriority) { + this.extraParams = extraParams; + this.requestedPriority = requestedPriority; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private RequestedPriority requestedPriority; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing( + this.extraParams, this.requestedPriority); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Routing requested priority. */ + public Builder setRequestedPriority( + PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority + requestedPriority) { + this.requestedPriority = requestedPriority; + return this; + } + } + + public enum RequestedPriority implements ApiRequestParams.EnumParam { + @SerializedName("domestic") + DOMESTIC("domestic"), + + @SerializedName("international") + INTERNATIONAL("international"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestedPriority(String value) { + this.value = value; + } + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Cashapp( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Crypto build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Crypto( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Crypto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Crypto#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Crypto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerBalance { + /** + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. + */ + @SerializedName("bank_transfer") + BankTransfer bankTransfer; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 funding method type to be used when there are not enough funds in the customer balance. + * Permitted values include: {@code bank_transfer}. + */ + @SerializedName("funding_type") + FundingType fundingType; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private CustomerBalance( + BankTransfer bankTransfer, + Map extraParams, + FundingType fundingType, + SetupFutureUsage setupFutureUsage) { + this.bankTransfer = bankTransfer; + this.extraParams = extraParams; + this.fundingType = fundingType; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankTransfer bankTransfer; + + private Map extraParams; + + private FundingType fundingType; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance( + this.bankTransfer, this.extraParams, this.fundingType, this.setupFutureUsage); + } + + /** + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. + */ + public Builder setBankTransfer( + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + bankTransfer) { + this.bankTransfer = bankTransfer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.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.PaymentMethodOptions.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; + } + + /** + * The funding method type to be used when there are not enough funds in the customer + * balance. Permitted values include: {@code bank_transfer}. + */ + public Builder setFundingType( + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.FundingType + fundingType) { + this.fundingType = fundingType; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankTransfer { + /** Configuration for the eu_bank_transfer funding type. */ + @SerializedName("eu_bank_transfer") + EuBankTransfer euBankTransfer; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * List of address types that should be returned in the financial_addresses response. If not + * specified, all valid types will be returned. + * + *

Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code + * spei}. + */ + @SerializedName("requested_address_types") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes; + + /** + * Required. The list of bank transfer types that this PaymentIntent is + * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code + * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code + * us_bank_transfer}. + */ + @SerializedName("type") + Type type; + + private BankTransfer( + EuBankTransfer euBankTransfer, + Map extraParams, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes, + Type type) { + this.euBankTransfer = euBankTransfer; + this.extraParams = extraParams; + this.requestedAddressTypes = requestedAddressTypes; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private EuBankTransfer euBankTransfer; + + private Map extraParams; + + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer( + this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); + } + + /** Configuration for the eu_bank_transfer funding type. */ + public Builder setEuBankTransfer( + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer + euBankTransfer) { + this.euBankTransfer = euBankTransfer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `requestedAddressTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} + * for the field documentation. + */ + public Builder addRequestedAddressType( + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType + element) { + if (this.requestedAddressTypes == null) { + this.requestedAddressTypes = new ArrayList<>(); + } + this.requestedAddressTypes.add(element); + return this; + } + + /** + * Add all elements to `requestedAddressTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} + * for the field documentation. + */ + public Builder addAllRequestedAddressType( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + elements) { + if (this.requestedAddressTypes == null) { + this.requestedAddressTypes = new ArrayList<>(); + } + this.requestedAddressTypes.addAll(elements); + return this; + } + + /** + * Required. The list of bank transfer types that this PaymentIntent is + * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code + * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code + * us_bank_transfer}. + */ + public Builder setType( + PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EuBankTransfer { + /** + * Required. The desired country code of the bank account information. + * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, + * or {@code NL}. + */ + @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; + + private EuBankTransfer(String country, Map extraParams) { + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance + .BankTransfer.EuBankTransfer(this.country, this.extraParams); + } + + /** + * Required. The desired country code of the bank account information. + * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, + * or {@code NL}. + */ + 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.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#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 RequestedAddressType implements ApiRequestParams.EnumParam { + @SerializedName("aba") + ABA("aba"), + + @SerializedName("iban") + IBAN("iban"), + + @SerializedName("sepa") + SEPA("sepa"), + + @SerializedName("sort_code") + SORT_CODE("sort_code"), + + @SerializedName("spei") + SPEI("spei"), + + @SerializedName("swift") + SWIFT("swift"), + + @SerializedName("zengin") + ZENGIN("zengin"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestedAddressType(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("eu_bank_transfer") + EU_BANK_TRANSFER("eu_bank_transfer"), + + @SerializedName("gb_bank_transfer") + GB_BANK_TRANSFER("gb_bank_transfer"), + + @SerializedName("jp_bank_transfer") + JP_BANK_TRANSFER("jp_bank_transfer"), + + @SerializedName("mx_bank_transfer") + MX_BANK_TRANSFER("mx_bank_transfer"), + + @SerializedName("us_bank_transfer") + US_BANK_TRANSFER("us_bank_transfer"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + public enum FundingType implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FundingType(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class 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; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Eps build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Eps( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Eps.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Fpx { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Fpx build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Fpx( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Fpx#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Fpx#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Fpx.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Giropay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Giropay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Giropay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Giropay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Giropay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Giropay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Gopay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Gopay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Gopay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Gopay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Gopay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Gopay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer { + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 + * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + @SerializedName("expires_after") + Long expiresAfter; + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private IdBankTransfer( + Long expiresAfter, + Long expiresAt, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.expiresAfter = expiresAfter; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfter; + + private Long expiresAt; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer( + this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + public Builder setExpiresAfter(Long expiresAfter) { + this.expiresAfter = expiresAfter; + return this; + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ideal { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Ideal(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Ideal build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Ideal( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Ideal#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Ideal#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Ideal.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InteracPresent { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private InteracPresent(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private KakaoPay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Klarna { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** On-demand details if setting up or charging an on-demand payment. */ + @SerializedName("on_demand") + OnDemand onDemand; + + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + @SerializedName("supplementary_purchase_data") + Object supplementaryPurchaseData; + + private Klarna( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + OnDemand onDemand, + PreferredLocale preferredLocale, + SetupFutureUsage setupFutureUsage, + Object subscriptions, + Object supplementaryPurchaseData) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.onDemand = onDemand; + this.preferredLocale = preferredLocale; + this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; + this.supplementaryPurchaseData = supplementaryPurchaseData; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private OnDemand onDemand; + + private PreferredLocale preferredLocale; + + private SetupFutureUsage setupFutureUsage; + + private Object subscriptions; + + private Object supplementaryPurchaseData; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna( + this.captureMethod, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.setupFutureUsage, + this.subscriptions, + this.supplementaryPurchaseData); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** On-demand details if setting up or charging an on-demand payment. */ + public Builder setOnDemand( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.PreferredLocale + preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription>(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription>(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List + subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData(EmptyParam supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval 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; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + String name; + + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + String reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + String name, + NextBilling nextBilling, + String reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String name; + + private NextBilling nextBilling; + + private String reference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.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.PaymentMethodOptions.Klarna.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. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#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 3D Secure authentication was performed with a third-party provider, the authentication - * details to use for this payment. - */ - public Builder setThreeDSecure( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { - this.threeDSecure = threeDSecure; - 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 @EqualsAndHashCode(callSuper = false) - public static class Installments { - /** - * Setting to true enables installments for this PaymentIntent. This will cause the response - * to contain a list of available installment plans. Setting to false will prevent any - * selected plan from applying to a charge. - */ - @SerializedName("enabled") - Boolean enabled; + public static class SupplementaryPurchaseData { + /** Supplementary bus reservation details. */ + @SerializedName("bus_reservation_details") + Object busReservationDetails; + + /** Supplementary event reservation details. */ + @SerializedName("event_reservation_details") + Object eventReservationDetails; /** * Map of extra parameters for custom features not available in this client library. The @@ -18600,17 +29492,49 @@ public static class Installments { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * The selected installment plan to use for this payment attempt. This parameter can only be - * provided during confirmation. - */ - @SerializedName("plan") - Object plan; + /** Supplementary ferry reservation details. */ + @SerializedName("ferry_reservation_details") + Object ferryReservationDetails; - private Installments(Boolean enabled, Map extraParams, Object plan) { - this.enabled = enabled; + /** Supplementary insurance details. */ + @SerializedName("insurances") + Object insurances; + + /** Supplementary marketplace seller details. */ + @SerializedName("marketplace_sellers") + Object marketplaceSellers; + + /** Supplementary round trip reservation details. */ + @SerializedName("round_trip_reservation_details") + Object roundTripReservationDetails; + + /** Supplementary train reservation details. */ + @SerializedName("train_reservation_details") + Object trainReservationDetails; + + /** Voucher details, such as a gift card or discount code. */ + @SerializedName("vouchers") + Object vouchers; + + private SupplementaryPurchaseData( + Object busReservationDetails, + Object eventReservationDetails, + Map extraParams, + Object ferryReservationDetails, + Object insurances, + Object marketplaceSellers, + Object roundTripReservationDetails, + Object trainReservationDetails, + Object vouchers) { + this.busReservationDetails = busReservationDetails; + this.eventReservationDetails = eventReservationDetails; this.extraParams = extraParams; - this.plan = plan; + this.ferryReservationDetails = ferryReservationDetails; + this.insurances = insurances; + this.marketplaceSellers = marketplaceSellers; + this.roundTripReservationDetails = roundTripReservationDetails; + this.trainReservationDetails = trainReservationDetails; + this.vouchers = vouchers; } public static Builder builder() { @@ -18618,87 +29542,651 @@ public static Builder builder() { } public static class Builder { - private Boolean enabled; + private Object busReservationDetails; + + private Object eventReservationDetails; private Map extraParams; - private Object plan; + private Object ferryReservationDetails; + + private Object insurances; + + private Object marketplaceSellers; + + private Object roundTripReservationDetails; + + private Object trainReservationDetails; + + private Object vouchers; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments( - this.enabled, this.extraParams, this.plan); + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData( + this.busReservationDetails, + this.eventReservationDetails, + this.extraParams, + this.ferryReservationDetails, + this.insurances, + this.marketplaceSellers, + this.roundTripReservationDetails, + this.trainReservationDetails, + this.vouchers); + } + + /** + * Add an element to `busReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addBusReservationDetail( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail + element) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `busReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllBusReservationDetail( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + elements) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails(EmptyParam busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** + * Add an element to `eventReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addEventReservationDetail( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail + element) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `eventReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllEventReservationDetail( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + elements) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails(EmptyParam eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `ferryReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFerryReservationDetail( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail + element) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `ferryReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFerryReservationDetail( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + elements) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails(EmptyParam ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } + + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance + element) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllInsurance( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + elements) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .addAll(elements); + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances(EmptyParam insurances) { + this.insurances = insurances; + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + insurances) { + this.insurances = insurances; + return this; + } + + /** + * Add an element to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addMarketplaceSeller( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller + element) { + if (this.marketplaceSellers == null || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .add(element); + return this; + } + + /** + * Add all elements to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllMarketplaceSeller( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + elements) { + if (this.marketplaceSellers == null || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .addAll(elements); + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers(EmptyParam marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** + * Add an element to `roundTripReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addRoundTripReservationDetail( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail + element) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `roundTripReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllRoundTripReservationDetail( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + elements) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails(EmptyParam roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } + + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; } /** - * Setting to true enables installments for this PaymentIntent. This will cause the - * response to contain a list of available installment plans. Setting to false will - * prevent any selected plan from applying to a charge. + * Add an element to `trainReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. */ - public Builder setEnabled(Boolean enabled) { - this.enabled = enabled; + @SuppressWarnings("unchecked") + public Builder addTrainReservationDetail( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail + element) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .add(element); return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments#extraParams} for the - * field documentation. + * Add all elements to `trainReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @SuppressWarnings("unchecked") + public Builder addAllTrainReservationDetail( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + elements) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); } - this.extraParams.put(key, value); + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails(EmptyParam trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } + + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments#extraParams} for the - * field documentation. + * Add an element to `vouchers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @SuppressWarnings("unchecked") + public Builder addVoucher( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher + element) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); } - this.extraParams.putAll(map); + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .add(element); return this; } /** - * The selected installment plan to use for this payment attempt. This parameter can only - * be provided during confirmation. + * Add all elements to `vouchers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. */ - public Builder setPlan( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan plan) { - this.plan = plan; + @SuppressWarnings("unchecked") + public Builder addAllVoucher( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + elements) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); + } + ((List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .addAll(elements); return this; } - /** - * The selected installment plan to use for this payment attempt. This parameter can only - * be provided during confirmation. - */ - public Builder setPlan(EmptyParam plan) { - this.plan = plan; + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers(EmptyParam vouchers) { + this.vouchers = vouchers; + return this; + } + + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + vouchers) { + this.vouchers = vouchers; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Plan { - /** - * For {@code fixed_count} installment plans, this is required. It represents the number - * of installment payments your customer will make to their credit card. - */ - @SerializedName("count") - Long count; + public static class BusReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; /** * Map of extra parameters for custom features not available in this client library. The @@ -18710,26 +30198,55 @@ public static class Plan { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * For {@code fixed_count} installment plans, this is required. It represents the interval - * between installment payments your customer will make to their credit card. One of - * {@code month}. - */ - @SerializedName("interval") - Interval interval; - - /** - * Required. Type of installment plan, one of {@code fixed_count}, {@code - * bonus}, or {@code revolving}. - */ - @SerializedName("type") - Type type; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; - private Plan(Long count, Map extraParams, Interval interval, Type type) { - this.count = count; + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private BusReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; this.extraParams = extraParams; - this.interval = interval; - this.type = type; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } public static Builder builder() { @@ -18737,26 +30254,83 @@ public static Builder builder() { } public static class Builder { - private Long count; + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; private Map extraParams; - private Interval interval; + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; - private Type type; + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan( - this.count, this.extraParams, this.interval, this.type); + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); } - /** - * For {@code fixed_count} installment plans, this is required. It represents the number - * of installment payments your customer will make to their credit card. - */ - public Builder setCount(Long count) { - this.count = count; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure + departure) { + this.departure = departure; return this; } @@ -18764,7 +30338,7 @@ public Builder setCount(Long count) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -18779,505 +30353,920 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } - this.extraParams.putAll(map); - return this; - } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } - /** - * For {@code fixed_count} installment plans, this is required. It represents the - * interval between installment payments your customer will make to their credit card. - * One of {@code month}. - */ - public Builder setInterval( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan.Interval - interval) { - this.interval = interval; - return this; - } + public static class Builder { + private String city; - /** - * Required. Type of installment plan, one of {@code fixed_count}, - * {@code bonus}, or {@code revolving}. - */ - public Builder setType( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { - this.type = type; - return this; - } - } + private String country; - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("month") - MONTH("month"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private String postalCode; - Interval(String value) { - this.value = value; - } - } + private String region; - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("bonus") - BONUS("bonus"), + private String streetAddress; - @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"), + private String streetAddress2; - @SerializedName("revolving") - REVOLVING("revolving"); + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - Type(String value) { - this.value = value; + /** The country in ISO 3166-1 alpha-2 format. */ + 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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { - /** Required. Amount to be charged for future payments. */ - @SerializedName("amount") - Long amount; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - /** - * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, the - * {@code amount} param refers to the exact amount to be charged in future payments. If - * {@code maximum}, the amount charged can be up to the value passed for the {@code amount} - * param. - */ - @SerializedName("amount_type") - AmountType amountType; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - /** - * A description of the mandate or subscription that is meant to be displayed to the - * customer. - */ - @SerializedName("description") - String description; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - /** - * End date of the mandate or subscription. If not provided, the mandate will be active - * until canceled. If provided, end date should be after start date. - */ - @SerializedName("end_date") - Long endDate; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - /** - * Required. Specifies payment frequency. One of {@code day}, {@code week}, - * {@code month}, {@code year}, or {@code sporadic}. - */ - @SerializedName("interval") - Interval interval; + public static Builder builder() { + return new Builder(); + } - /** - * The number of intervals between payments. For example, {@code interval=month} and {@code - * interval_count=3} indicates one payment every three months. Maximum of one year interval - * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code - * interval=sporadic}. - */ - @SerializedName("interval_count") - Long intervalCount; + public static class Builder { + private Address address; - /** Required. Unique identifier for the mandate or subscription. */ - @SerializedName("reference") - String reference; + private Long departsAt; - /** - * Required. Start date of the mandate or subscription. Start date should - * not be lesser than yesterday. - */ - @SerializedName("start_date") - Long startDate; + private String departureLocation; - /** Specifies the type of mandates supported. Possible values are {@code india}. */ - @SerializedName("supported_types") - List - supportedTypes; + private Map extraParams; - private MandateOptions( - Long amount, - AmountType amountType, - String description, - Long endDate, - Map extraParams, - Interval interval, - Long intervalCount, - String reference, - Long startDate, - List - supportedTypes) { - this.amount = amount; - this.amountType = amountType; - this.description = description; - this.endDate = endDate; - this.extraParams = extraParams; - this.interval = interval; - this.intervalCount = intervalCount; - this.reference = reference; - this.startDate = startDate; - this.supportedTypes = supportedTypes; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - public static Builder builder() { - return new Builder(); - } + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - public static class Builder { - private Long amount; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - private AmountType amountType; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - private String description; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Long endDate; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - private Interval interval; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - private Long intervalCount; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - private String reference; + public static Builder builder() { + return new Builder(); + } - private Long startDate; + public static class Builder { + private String city; - private List< - PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> - supportedTypes; + private String country; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions( - this.amount, - this.amountType, - this.description, - this.endDate, - this.extraParams, - this.interval, - this.intervalCount, - this.reference, - this.startDate, - this.supportedTypes); - } + private Map extraParams; - /** Required. Amount to be charged for future payments. */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } + private String postalCode; - /** - * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, - * the {@code amount} param refers to the exact amount to be charged in future payments. - * If {@code maximum}, the amount charged can be up to the value passed for the {@code - * amount} param. - */ - public Builder setAmountType( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.AmountType - amountType) { - this.amountType = amountType; - return this; - } + private String region; + + private String streetAddress; + + private String streetAddress2; - /** - * A description of the mandate or subscription that is meant to be displayed to the - * customer. - */ - public Builder setDescription(String description) { - this.description = description; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - /** - * End date of the mandate or subscription. If not provided, the mandate will be active - * until canceled. If provided, end date should be after start date. - */ - public Builder setEndDate(Long endDate) { - this.endDate = endDate; - return this; - } + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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; + } - /** - * Required. Specifies payment frequency. One of {@code day}, {@code - * week}, {@code month}, {@code year}, or {@code sporadic}. - */ - public Builder setInterval( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.Interval - interval) { - this.interval = interval; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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; + } - /** - * The number of intervals between payments. For example, {@code interval=month} and - * {@code interval_count=3} indicates one payment every three months. Maximum of one year - * interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when - * {@code interval=sporadic}. - */ - public Builder setIntervalCount(Long intervalCount) { - this.intervalCount = intervalCount; - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** Required. Unique identifier for the mandate or subscription. */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - /** - * Required. Start date of the mandate or subscription. Start date should - * not be lesser than yesterday. - */ - public Builder setStartDate(Long startDate) { - this.startDate = startDate; - return this; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Add an element to `supportedTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for - * the field documentation. - */ - public Builder addSupportedType( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions.SupportedType - element) { - if (this.supportedTypes == null) { - this.supportedTypes = new ArrayList<>(); + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } } - this.supportedTypes.add(element); - return this; } - /** - * Add all elements to `supportedTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for - * the field documentation. - */ - public Builder addAllSupportedType( - List< - PaymentIntentConfirmParams.PaymentMethodOptions.Card.MandateOptions - .SupportedType> - elements) { - if (this.supportedTypes == null) { - this.supportedTypes = new ArrayList<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; } - this.supportedTypes.addAll(elements); - return this; - } - } - public enum AmountType implements ApiRequestParams.EnumParam { - @SerializedName("fixed") - FIXED("fixed"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("maximum") - MAXIMUM("maximum"); + public static class Builder { + private String currency; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - AmountType(String value) { - this.value = value; - } - } + private String insuranceCompanyName; - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + private InsuranceType insuranceType; - @SerializedName("month") - MONTH("month"), + private Long price; - @SerializedName("sporadic") - SPORADIC("sporadic"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - @SerializedName("week") - WEEK("week"), + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @SerializedName("year") - YEAR("year"); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - Interval(String value) { - this.value = value; - } - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - public enum SupportedType implements ApiRequestParams.EnumParam { - @SerializedName("india") - INDIA("india"); + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - SupportedType(String value) { - this.value = value; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class StatementDetails { - /** Please pass in an address that is within your Stripe user account country. */ - @SerializedName("address") - Address address; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 family name of the person. */ + @SerializedName("family_name") + String familyName; - /** Phone number (e.g., a toll-free number that customers can call). */ - @SerializedName("phone") - String phone; + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; + + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - private StatementDetails(Address address, Map extraParams, String phone) { - this.address = address; - this.extraParams = extraParams; - this.phone = phone; - } + public static Builder builder() { + return new Builder(); + } - public static Builder builder() { - return new Builder(); - } + public static class Builder { + private Map extraParams; - public static class Builder { - private Address address; + private String familyName; - private Map extraParams; + private String givenName; - private String phone; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails( - this.address, this.extraParams, this.phone); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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; + } - /** Please pass in an address that is within your Stripe user account country. */ - public Builder setAddress( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails.Address - address) { - this.address = address; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } } - this.extraParams.putAll(map); - return this; } - /** Phone number (e.g., a toll-free number that customers can call). */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + public static class EventReservationDetail { + /** Indicates if the tickets are digitally checked when entering the venue. */ + @SerializedName("access_controlled_venue") + Boolean accessControlledVenue; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + /** Address of the event. */ + @SerializedName("address") + Address address; + + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** End timestamp of the event. */ + @SerializedName("ends_at") + Long endsAt; + + /** Company selling the ticket. */ + @SerializedName("event_company_name") + String eventCompanyName; + + /** Name of the event. */ + @SerializedName("event_name") + String eventName; + + /** Type of the event. */ + @SerializedName("event_type") + EventType eventType; /** * Map of extra parameters for custom features not available in this client library. The @@ -19289,37 +31278,47 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the 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, + /** List of insurances for this event. */ + @SerializedName("insurances") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance> + insurances; + + /** Start timestamp of the event. */ + @SerializedName("starts_at") + Long startsAt; + + /** Name of the venue where the event takes place. */ + @SerializedName("venue_name") + String venueName; + + private EventReservationDetail( + Boolean accessControlledVenue, + Address address, + String affiliateName, + Long endsAt, + String eventCompanyName, + String eventName, + EventType eventType, Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances, + Long startsAt, + String venueName) { + this.accessControlledVenue = accessControlledVenue; + this.address = address; + this.affiliateName = affiliateName; + this.endsAt = endsAt; + this.eventCompanyName = eventCompanyName; + this.eventName = eventName; + this.eventType = eventType; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.insurances = insurances; + this.startsAt = startsAt; + this.venueName = venueName; } public static Builder builder() { @@ -19327,46 +31326,95 @@ public static Builder builder() { } public static class Builder { - private String city; + private Boolean accessControlledVenue; - private String country; + private Address address; - private Map extraParams; + private String affiliateName; - private String line1; + private Long endsAt; - private String line2; + private String eventCompanyName; - private String postalCode; + private String eventName; - private String state; + private EventType eventType; + + private Map extraParams; + + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance> + insurances; + + private Long startsAt; + + private String venueName; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails.Address + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails - .Address( - this.city, - this.country, + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail( + this.accessControlledVenue, + this.address, + this.affiliateName, + this.endsAt, + this.eventCompanyName, + this.eventName, + this.eventType, this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); + this.insurances, + this.startsAt, + this.venueName); } - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; return this; } - /** - * Two-letter country code (ISO 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Address of the event. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Address + address) { + this.address = address; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** End timestamp of the event. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } + + /** Company selling the ticket. */ + public Builder setEventCompanyName(String eventCompanyName) { + this.eventCompanyName = eventCompanyName; + return this; + } + + /** Name of the event. */ + public Builder setEventName(String eventName) { + this.eventName = eventName; + return this; + } + + /** Type of the event. */ + public Builder setEventType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.EventType + eventType) { + this.eventType = eventType; return this; } @@ -19374,7 +31422,7 @@ public Builder setCountry(String country) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails.Address#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19389,7 +31437,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.StatementDetails.Address#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -19400,267 +31448,417 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); return this; } - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; + /** Start timestamp of the event. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; return this; } - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; + /** Name of the venue where the event takes place. */ + public Builder setVenueName(String venueName) { + this.venueName = venueName; return this; } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class ThreeDSecure { - /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ - @SerializedName("ares_trans_status") - AresTransStatus aresTransStatus; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; - /** - * Required. The cryptogram, also known as the "authentication - * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a - * 28-character string. (Most 3D Secure providers will return the base64-encoded version, - * which is what you should specify here.) - */ - @SerializedName("cryptogram") - String cryptogram; + private String postalCode; - /** - * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and - * indicates what degree of authentication was performed. - */ - @SerializedName("electronic_commerce_indicator") - ElectronicCommerceIndicator electronicCommerceIndicator; + private String region; - /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ - @SerializedName("exemption_indicator") - ExemptionIndicator exemptionIndicator; + private String streetAddress; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 String streetAddress2; - /** - * Network specific 3DS fields. Network specific arguments require an explicit card brand - * choice. The parameter `payment_method_options.card.network`` must be populated - * accordingly - */ - @SerializedName("network_options") - NetworkOptions networkOptions; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - /** - * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the - * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - */ - @SerializedName("requestor_challenge_indicator") - String requestorChallengeIndicator; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - @SerializedName("transaction_id") - String transactionId; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** Required. The version of 3D Secure that was performed. */ - @SerializedName("version") - Version version; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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; + } - private ThreeDSecure( - AresTransStatus aresTransStatus, - String cryptogram, - ElectronicCommerceIndicator electronicCommerceIndicator, - ExemptionIndicator exemptionIndicator, - Map extraParams, - NetworkOptions networkOptions, - String requestorChallengeIndicator, - String transactionId, - Version version) { - this.aresTransStatus = aresTransStatus; - this.cryptogram = cryptogram; - this.electronicCommerceIndicator = electronicCommerceIndicator; - this.exemptionIndicator = exemptionIndicator; - this.extraParams = extraParams; - this.networkOptions = networkOptions; - this.requestorChallengeIndicator = requestorChallengeIndicator; - this.transactionId = transactionId; - this.version = version; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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; + } - public static Builder builder() { - return new Builder(); - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - public static class Builder { - private AresTransStatus aresTransStatus; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - private String cryptogram; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - private ElectronicCommerceIndicator electronicCommerceIndicator; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } - private ExemptionIndicator exemptionIndicator; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - private Map extraParams; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private NetworkOptions networkOptions; + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - private String requestorChallengeIndicator; + public static Builder builder() { + return new Builder(); + } - private String transactionId; + public static class Builder { + private String currency; - private Version version; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure( - this.aresTransStatus, - this.cryptogram, - this.electronicCommerceIndicator, - this.exemptionIndicator, - this.extraParams, - this.networkOptions, - this.requestorChallengeIndicator, - this.transactionId, - this.version); - } + private String insuranceCompanyName; - /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ - public Builder setAresTransStatus( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus - aresTransStatus) { - this.aresTransStatus = aresTransStatus; - return this; - } + private InsuranceType insuranceType; - /** - * Required. The cryptogram, also known as the "authentication - * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a - * 28-character string. (Most 3D Secure providers will return the base64-encoded version, - * which is what you should specify here.) - */ - public Builder setCryptogram(String cryptogram) { - this.cryptogram = cryptogram; - return this; - } + private Long price; - /** - * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and - * indicates what degree of authentication was performed. - */ - public Builder setElectronicCommerceIndicator( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure - .ElectronicCommerceIndicator - electronicCommerceIndicator) { - this.electronicCommerceIndicator = electronicCommerceIndicator; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ - public Builder setExemptionIndicator( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.ExemptionIndicator - exemptionIndicator) { - this.exemptionIndicator = exemptionIndicator; - return this; - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } } - this.extraParams.putAll(map); - return this; } - /** - * Network specific 3DS fields. Network specific arguments require an explicit card brand - * choice. The parameter `payment_method_options.card.network`` must be populated - * accordingly - */ - public Builder setNetworkOptions( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - networkOptions) { - this.networkOptions = networkOptions; - return this; - } + public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("concert") + CONCERT("concert"), - /** - * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in - * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - */ - public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { - this.requestorChallengeIndicator = requestorChallengeIndicator; - return this; - } + @SerializedName("conference") + CONFERENCE("conference"), - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - public Builder setTransactionId(String transactionId) { - this.transactionId = transactionId; - return this; - } + @SerializedName("digital_education") + DIGITAL_EDUCATION("digital_education"), - /** Required. The version of 3D Secure that was performed. */ - public Builder setVersion( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { - this.version = version; - return this; + @SerializedName("expo") + EXPO("expo"), + + @SerializedName("festival") + FESTIVAL("festival"), + + @SerializedName("in_person_education") + IN_PERSON_EDUCATION("in_person_education"), + + @SerializedName("sport") + SPORT("sport"), + + @SerializedName("tour") + TOUR("tour"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EventType(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class NetworkOptions { - /** Cartes Bancaires-specific 3DS fields. */ - @SerializedName("cartes_bancaires") - CartesBancaires cartesBancaires; + public static class FerryReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; /** * Map of extra parameters for custom features not available in this client library. The @@ -19672,9 +31870,55 @@ public static class NetworkOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { - this.cartesBancaires = cartesBancaires; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private FerryReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } public static Builder builder() { @@ -19682,23 +31926,83 @@ public static Builder builder() { } public static class Builder { - private CartesBancaires cartesBancaires; + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; private Map extraParams; + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; + + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure - .NetworkOptions(this.cartesBancaires, this.extraParams); + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); } - /** Cartes Bancaires-specific 3DS fields. */ - public Builder setCartesBancaires( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires - cartesBancaires) { - this.cartesBancaires = cartesBancaires; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure + departure) { + this.departure = departure; return this; } @@ -19706,7 +32010,7 @@ public Builder setCartesBancaires( * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19717,47 +32021,374 @@ public Builder putExtraParam(String key, Object value) { return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } } - this.extraParams.putAll(map); - return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class CartesBancaires { - /** - * Required. The cryptogram calculation algorithm used by the card - * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code - * cavvAlgorithm}. messageExtension: CB-AVALGO - */ - @SerializedName("cb_avalgo") - CbAvalgo cbAvalgo; + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - /** - * The exemption indicator returned from Cartes Bancaires in the ARes. message - * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low - * significant byte first and most significant bit first) that has been Base64 encoded - */ - @SerializedName("cb_exemption") - String cbExemption; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - /** - * The risk score returned from Cartes Bancaires in the ARes. message extension: - * CB-SCORE; numeric value 0-99 - */ - @SerializedName("cb_score") - Long cbScore; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; /** * Map of extra parameters for custom features not available in this client library. The @@ -19769,14 +32400,14 @@ public static class CartesBancaires { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CartesBancaires( - CbAvalgo cbAvalgo, - String cbExemption, - Long cbScore, + private Departure( + Address address, + Long departsAt, + String departureLocation, Map extraParams) { - this.cbAvalgo = cbAvalgo; - this.cbExemption = cbExemption; - this.cbScore = cbScore; + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; this.extraParams = extraParams; } @@ -19785,52 +32416,41 @@ public static Builder builder() { } public static class Builder { - private CbAvalgo cbAvalgo; + private Address address; - private String cbExemption; + private Long departsAt; - private Long cbScore; + private String departureLocation; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure - .NetworkOptions.CartesBancaires + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure - .NetworkOptions.CartesBancaires( - this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); } - /** - * Required. The cryptogram calculation algorithm used by the card - * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code - * cavvAlgorithm}. messageExtension: CB-AVALGO - */ - public Builder setCbAvalgo( - PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires.CbAvalgo - cbAvalgo) { - this.cbAvalgo = cbAvalgo; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure.Address + address) { + this.address = address; return this; } - /** - * The exemption indicator returned from Cartes Bancaires in the ARes. message - * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low - * significant byte first and most significant bit first) that has been Base64 encoded - */ - public Builder setCbExemption(String cbExemption) { - this.cbExemption = cbExemption; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; return this; } - /** - * The risk score returned from Cartes Bancaires in the ARes. message extension: - * CB-SCORE; numeric value 0-99 - */ - public Builder setCbScore(Long cbScore) { - this.cbScore = cbScore; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; return this; } @@ -19838,7 +32458,7 @@ public Builder setCbScore(Long cbScore) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19853,7 +32473,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -19865,1288 +32485,1213 @@ public Builder putAllExtraParam(Map map) { } } - public enum CbAvalgo implements ApiRequestParams.EnumParam { - @SerializedName("0") - N0("0"), - - @SerializedName("1") - N1("1"), - - @SerializedName("2") - N2("2"), - - @SerializedName("3") - N3("3"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - @SerializedName("4") - N4("4"), - - @SerializedName("A") - A("A"); - - @Getter(onMethod_ = {@Override}) - private final String value; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - CbAvalgo(String value) { - this.value = value; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; } - } - } - } - - public enum AresTransStatus implements ApiRequestParams.EnumParam { - @SerializedName("A") - A("A"), - - @SerializedName("C") - C("C"), - - @SerializedName("I") - I("I"), - - @SerializedName("N") - N("N"), - - @SerializedName("R") - R("R"), - - @SerializedName("U") - U("U"), - - @SerializedName("Y") - Y("Y"); - - @Getter(onMethod_ = {@Override}) - private final String value; - AresTransStatus(String value) { - this.value = value; - } - } + public static Builder builder() { + return new Builder(); + } - public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { - @SerializedName("01") - N01("01"), + public static class Builder { + private String city; - @SerializedName("02") - N02("02"), + private String country; - @SerializedName("05") - N05("05"), + private Map extraParams; - @SerializedName("06") - N06("06"), + private String postalCode; - @SerializedName("07") - N07("07"); + private String region; - @Getter(onMethod_ = {@Override}) - private final String value; + private String streetAddress; - ElectronicCommerceIndicator(String value) { - this.value = value; - } - } + private String streetAddress2; - public enum ExemptionIndicator implements ApiRequestParams.EnumParam { - @SerializedName("low_risk") - LOW_RISK("low_risk"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - @SerializedName("none") - NONE("none"); + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - ExemptionIndicator(String value) { - this.value = value; - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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; + } - public enum Version implements ApiRequestParams.EnumParam { - @SerializedName("1.0.2") - N1__0__2("1.0.2"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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; + } - @SerializedName("2.1.0") - N2__1__0("2.1.0"), + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("2.2.0") - N2__2__0("2.2.0"); + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - Version(String value) { - this.value = value; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } } - } - } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - CaptureMethod(String value) { - this.value = value; - } - } - - public enum Network implements ApiRequestParams.EnumParam { - @SerializedName("amex") - AMEX("amex"), - - @SerializedName("cartes_bancaires") - CARTES_BANCAIRES("cartes_bancaires"), - - @SerializedName("diners") - DINERS("diners"), - - @SerializedName("discover") - DISCOVER("discover"), - - @SerializedName("eftpos_au") - EFTPOS_AU("eftpos_au"), - - @SerializedName("girocard") - GIROCARD("girocard"), - - @SerializedName("interac") - INTERAC("interac"), - - @SerializedName("jcb") - JCB("jcb"), - - @SerializedName("link") - LINK("link"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - @SerializedName("mastercard") - MASTERCARD("mastercard"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("unionpay") - UNIONPAY("unionpay"), + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - @SerializedName("unknown") - UNKNOWN("unknown"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("visa") - VISA("visa"); + public static class Builder { + private String currency; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - Network(String value) { - this.value = value; - } - } + private String insuranceCompanyName; - public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + private InsuranceType insuranceType; - @SerializedName("never") - NEVER("never"); + private Long price; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - RequestDecrementalAuthorization(String value) { - this.value = value; - } - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("never") - NEVER("never"); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#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(onMethod_ = {@Override}) - private final String value; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - RequestExtendedAuthorization(String value) { - this.value = value; - } - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - @SerializedName("never") - NEVER("never"); + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - RequestIncrementalAuthorization(String value) { - this.value = value; - } - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - public enum RequestMulticapture implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + @SerializedName("emergency") + EMERGENCY("emergency"), - @SerializedName("never") - NEVER("never"); + @SerializedName("medical") + MEDICAL("medical"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - RequestMulticapture(String value) { - this.value = value; - } - } + InsuranceType(String value) { + this.value = value; + } + } + } - public enum RequestOvercapture implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - @SerializedName("never") - NEVER("never"); + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - RequestOvercapture(String value) { - this.value = value; - } - } + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("never") - NEVER("never"); + public static class Builder { + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private String familyName; - RequestPartialAuthorization(String value) { - this.value = value; - } - } + private String givenName; - public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { - @SerializedName("any") - ANY("any"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - @SerializedName("automatic") - AUTOMATIC("automatic"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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; + } - @SerializedName("challenge") - CHALLENGE("challenge"); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - RequestThreeDSecure(String value) { - this.value = value; - } - } + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + } + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - @SerializedName("off_session") - OFF_SESSION("off_session"), + @SerializedName("economy") + ECONOMY("economy"), - @SerializedName("on_session") - ON_SESSION("on_session"); + @SerializedName("first_class") + FIRST_CLASS("first_class"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - SetupFutureUsage(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } + } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CardPresent { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - CaptureMethod captureMethod; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Request ability to capture this payment beyond the standard authorization - * validity window. - */ - @SerializedName("request_extended_authorization") - Boolean requestExtendedAuthorization; + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - /** - * Request ability to increment - * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response - * to verify support. - */ - @SerializedName("request_incremental_authorization_support") - Boolean requestIncrementalAuthorizationSupport; + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } + + public static Builder builder() { + return new Builder(); + } - /** - * Network routing priority on co-branded EMV cards supporting domestic debit and - * international card schemes. - */ - @SerializedName("routing") - Routing routing; + public static class Builder { + private String currency; - private CardPresent( - CaptureMethod captureMethod, - Map extraParams, - Boolean requestExtendedAuthorization, - Boolean requestIncrementalAuthorizationSupport, - Routing routing) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.requestExtendedAuthorization = requestExtendedAuthorization; - this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; - this.routing = routing; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String insuranceCompanyName; - public static class Builder { - private CaptureMethod captureMethod; + private InsuranceType insuranceType; - private Map extraParams; + private Long price; - private Boolean requestExtendedAuthorization; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - private Boolean requestIncrementalAuthorizationSupport; + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - private Routing routing; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent( - this.captureMethod, - this.extraParams, - this.requestExtendedAuthorization, - this.requestIncrementalAuthorizationSupport, - this.routing); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.CaptureMethod - captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } } - this.extraParams.putAll(map); - return this; } - /** - * Request ability to capture this payment beyond the standard authorization - * validity window. - */ - public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { - this.requestExtendedAuthorization = requestExtendedAuthorization; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSeller { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Request ability to increment - * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response - * to verify support. - */ - public Builder setRequestIncrementalAuthorizationSupport( - Boolean requestIncrementalAuthorizationSupport) { - this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; - return this; - } + /** The references to line items for purchases with multiple associated sub-sellers. */ + @SerializedName("line_item_references") + List lineItemReferences; - /** - * Network routing priority on co-branded EMV cards supporting domestic debit and - * international card schemes. - */ - public Builder setRouting( - PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing routing) { - this.routing = routing; - return this; - } - } + /** The address of the selling or delivering merchant. */ + @SerializedName("marketplace_seller_address") + MarketplaceSellerAddress marketplaceSellerAddress; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Routing { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 marketplace seller. */ + @SerializedName("marketplace_seller_name") + String marketplaceSellerName; - /** Routing requested priority. */ - @SerializedName("requested_priority") - RequestedPriority requestedPriority; + /** The unique identifier for the marketplace seller. */ + @SerializedName("marketplace_seller_reference") + String marketplaceSellerReference; - private Routing(Map extraParams, RequestedPriority requestedPriority) { - this.extraParams = extraParams; - this.requestedPriority = requestedPriority; - } + /** The number of transactions the sub-seller completed in the last 12 months. */ + @SerializedName("number_of_transactions") + Long numberOfTransactions; - public static Builder builder() { - return new Builder(); - } + /** The category of the product. */ + @SerializedName("product_category") + ProductCategory productCategory; - public static class Builder { - private Map extraParams; + /** The date when the seller's account with the marketplace was last logged in. */ + @SerializedName("seller_last_login_at") + Long sellerLastLoginAt; - private RequestedPriority requestedPriority; + /** + * The current rating of the marketplace seller. If the marketplace uses numeric ranking, + * map these to the enum values. + */ + @SerializedName("seller_rating") + SellerRating sellerRating; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing( - this.extraParams, this.requestedPriority); - } + /** The date when the seller's account with the marketplace was created. */ + @SerializedName("seller_registered_at") + Long sellerRegisteredAt; + + /** The date when the seller's account with the marketplace was last updated. */ + @SerializedName("seller_updated_at") + Long sellerUpdatedAt; /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for - * the field documentation. + * The references to shipping addresses for purchases with multiple associated + * sub-sellers. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("shipping_references") + List shippingReferences; /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for - * the field documentation. + * The accumulated amount of sales transactions made by the sub-merchant or sub-seller + * within the past 12 months in the payment currency. These transactions are in minor + * currency units. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("volume_of_transactions") + Long volumeOfTransactions; - /** Routing requested priority. */ - public Builder setRequestedPriority( - PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority - requestedPriority) { - this.requestedPriority = requestedPriority; - return this; + private MarketplaceSeller( + Map extraParams, + List lineItemReferences, + MarketplaceSellerAddress marketplaceSellerAddress, + String marketplaceSellerName, + String marketplaceSellerReference, + Long numberOfTransactions, + ProductCategory productCategory, + Long sellerLastLoginAt, + SellerRating sellerRating, + Long sellerRegisteredAt, + Long sellerUpdatedAt, + List shippingReferences, + Long volumeOfTransactions) { + this.extraParams = extraParams; + this.lineItemReferences = lineItemReferences; + this.marketplaceSellerAddress = marketplaceSellerAddress; + this.marketplaceSellerName = marketplaceSellerName; + this.marketplaceSellerReference = marketplaceSellerReference; + this.numberOfTransactions = numberOfTransactions; + this.productCategory = productCategory; + this.sellerLastLoginAt = sellerLastLoginAt; + this.sellerRating = sellerRating; + this.sellerRegisteredAt = sellerRegisteredAt; + this.sellerUpdatedAt = sellerUpdatedAt; + this.shippingReferences = shippingReferences; + this.volumeOfTransactions = volumeOfTransactions; } - } - public enum RequestedPriority implements ApiRequestParams.EnumParam { - @SerializedName("domestic") - DOMESTIC("domestic"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("international") - INTERNATIONAL("international"); + public static class Builder { + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private List lineItemReferences; - RequestedPriority(String value) { - this.value = value; - } - } - } + private MarketplaceSellerAddress marketplaceSellerAddress; - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"), + private String marketplaceSellerName; - @SerializedName("manual_preferred") - MANUAL_PREFERRED("manual_preferred"); + private String marketplaceSellerReference; - @Getter(onMethod_ = {@Override}) - private final String value; + private Long numberOfTransactions; - CaptureMethod(String value) { - this.value = value; - } - } - } + private ProductCategory productCategory; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Cashapp { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + private Long sellerLastLoginAt; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 SellerRating sellerRating; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + private Long sellerRegisteredAt; - private Cashapp( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Long sellerUpdatedAt; - public static Builder builder() { - return new Builder(); - } + private List shippingReferences; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Long volumeOfTransactions; - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller( + this.extraParams, + this.lineItemReferences, + this.marketplaceSellerAddress, + this.marketplaceSellerName, + this.marketplaceSellerReference, + this.numberOfTransactions, + this.productCategory, + this.sellerLastLoginAt, + this.sellerRating, + this.sellerRegisteredAt, + this.sellerUpdatedAt, + this.shippingReferences, + this.volumeOfTransactions); + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** + * Add an element to `lineItemReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addLineItemReference(String element) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.add(element); + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** + * Add all elements to `lineItemReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addAllLineItemReference(List elements) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.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.PaymentMethodOptions.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; - } + /** The address of the selling or delivering merchant. */ + public Builder setMarketplaceSellerAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.MarketplaceSellerAddress + marketplaceSellerAddress) { + this.marketplaceSellerAddress = marketplaceSellerAddress; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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; - } + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(String marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(String marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + 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; - } - } + /** The number of transactions the sub-seller completed in the last 12 months. */ + public Builder setNumberOfTransactions(Long numberOfTransactions) { + this.numberOfTransactions = numberOfTransactions; + return this; + } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** The category of the product. */ + public Builder setProductCategory( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.ProductCategory + productCategory) { + this.productCategory = productCategory; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The date when the seller's account with the marketplace was last logged in. */ + public Builder setSellerLastLoginAt(Long sellerLastLoginAt) { + this.sellerLastLoginAt = sellerLastLoginAt; + return this; + } - CaptureMethod(String value) { - this.value = value; - } - } + /** + * The current rating of the marketplace seller. If the marketplace uses numeric + * ranking, map these to the enum values. + */ + public Builder setSellerRating( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.SellerRating + sellerRating) { + this.sellerRating = sellerRating; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** The date when the seller's account with the marketplace was created. */ + public Builder setSellerRegisteredAt(Long sellerRegisteredAt) { + this.sellerRegisteredAt = sellerRegisteredAt; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** The date when the seller's account with the marketplace was last updated. */ + public Builder setSellerUpdatedAt(Long sellerUpdatedAt) { + this.sellerUpdatedAt = sellerUpdatedAt; + return this; + } - @SerializedName("on_session") - ON_SESSION("on_session"); + /** + * Add an element to `shippingReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addShippingReference(String element) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.add(element); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all elements to `shippingReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addAllShippingReference(List elements) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.addAll(elements); + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** + * The accumulated amount of sales transactions made by the sub-merchant or sub-seller + * within the past 12 months in the payment currency. These transactions are in minor + * currency units. + */ + public Builder setVolumeOfTransactions(Long volumeOfTransactions) { + this.volumeOfTransactions = volumeOfTransactions; + return this; + } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Crypto { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSellerAddress { + /** The city or town. */ + @SerializedName("city") + String city; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private MarketplaceSellerAddress( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - public static class Builder { - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private SetupFutureUsage setupFutureUsage; + public static class Builder { + private String city; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Crypto build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Crypto( - this.extraParams, this.setupFutureUsage); - } + private String country; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Crypto#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Map extraParams; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Crypto#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private String postalCode; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Crypto.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private String region; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private String streetAddress; - @Getter(onMethod_ = {@Override}) - private final String value; + private String streetAddress2; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CustomerBalance { - /** - * Configuration for the bank transfer funding type, if the {@code funding_type} is set to - * {@code bank_transfer}. - */ - @SerializedName("bank_transfer") - BankTransfer bankTransfer; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** - * The funding method type to be used when there are not enough funds in the customer balance. - * Permitted values include: {@code bank_transfer}. - */ - @SerializedName("funding_type") - FundingType fundingType; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private CustomerBalance( - BankTransfer bankTransfer, - Map extraParams, - FundingType fundingType, - SetupFutureUsage setupFutureUsage) { - this.bankTransfer = bankTransfer; - this.extraParams = extraParams; - this.fundingType = fundingType; - this.setupFutureUsage = setupFutureUsage; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - public static class Builder { - private BankTransfer bankTransfer; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - private Map extraParams; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } - private FundingType fundingType; + public enum ProductCategory implements ApiRequestParams.EnumParam { + @SerializedName("accessories") + ACCESSORIES("accessories"), - private SetupFutureUsage setupFutureUsage; + @SerializedName("appliances") + APPLIANCES("appliances"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance( - this.bankTransfer, this.extraParams, this.fundingType, this.setupFutureUsage); - } + @SerializedName("apps_and_games") + APPS_AND_GAMES("apps_and_games"), - /** - * Configuration for the bank transfer funding type, if the {@code funding_type} is set to - * {@code bank_transfer}. - */ - public Builder setBankTransfer( - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - bankTransfer) { - this.bankTransfer = bankTransfer; - return this; - } + @SerializedName("arts_crafts_and_sewing") + ARTS_CRAFTS_AND_SEWING("arts_crafts_and_sewing"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.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; - } + @SerializedName("automotive") + AUTOMOTIVE("automotive"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.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; - } + @SerializedName("baby") + BABY("baby"), - /** - * The funding method type to be used when there are not enough funds in the customer - * balance. Permitted values include: {@code bank_transfer}. - */ - public Builder setFundingType( - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.FundingType - fundingType) { - this.fundingType = fundingType; - return this; - } + @SerializedName("baby_clothing") + BABY_CLOTHING("baby_clothing"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @SerializedName("bags_and_purses") + BAGS_AND_PURSES("bags_and_purses"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BankTransfer { - /** Configuration for the eu_bank_transfer funding type. */ - @SerializedName("eu_bank_transfer") - EuBankTransfer euBankTransfer; + @SerializedName("beauty") + BEAUTY("beauty"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("books") + BOOKS("books"), - /** - * List of address types that should be returned in the financial_addresses response. If not - * specified, all valid types will be returned. - * - *

Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code - * spei}. - */ - @SerializedName("requested_address_types") - List< - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes; + @SerializedName("cds_and_vinyl") + CDS_AND_VINYL("cds_and_vinyl"), - /** - * Required. The list of bank transfer types that this PaymentIntent is - * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code - * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code - * us_bank_transfer}. - */ - @SerializedName("type") - Type type; + @SerializedName("cell_phones_and_accessories") + CELL_PHONES_AND_ACCESSORIES("cell_phones_and_accessories"), - private BankTransfer( - EuBankTransfer euBankTransfer, - Map extraParams, - List< - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes, - Type type) { - this.euBankTransfer = euBankTransfer; - this.extraParams = extraParams; - this.requestedAddressTypes = requestedAddressTypes; - this.type = type; - } + @SerializedName("collectibles_and_fine_arts") + COLLECTIBLES_AND_FINE_ARTS("collectibles_and_fine_arts"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("digital_music") + DIGITAL_MUSIC("digital_music"), - public static class Builder { - private EuBankTransfer euBankTransfer; + @SerializedName("electronics") + ELECTRONICS("electronics"), - private Map extraParams; + @SerializedName("grocery_and_gourmet_food") + GROCERY_AND_GOURMET_FOOD("grocery_and_gourmet_food"), - private List< - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes; + @SerializedName("handmade") + HANDMADE("handmade"), - private Type type; + @SerializedName("health_and_personal_care") + HEALTH_AND_PERSONAL_CARE("health_and_personal_care"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer( - this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); - } + @SerializedName("home_and_kitchen") + HOME_AND_KITCHEN("home_and_kitchen"), - /** Configuration for the eu_bank_transfer funding type. */ - public Builder setEuBankTransfer( - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer - euBankTransfer) { - this.euBankTransfer = euBankTransfer; - return this; - } + @SerializedName("industrial_and_scientific") + INDUSTRIAL_AND_SCIENTIFIC("industrial_and_scientific"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("luggage_and_travel_gear") + LUGGAGE_AND_TRAVEL_GEAR("luggage_and_travel_gear"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("magazine_subscriptions") + MAGAZINE_SUBSCRIPTIONS("magazine_subscriptions"), - /** - * Add an element to `requestedAddressTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} - * for the field documentation. - */ - public Builder addRequestedAddressType( - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType - element) { - if (this.requestedAddressTypes == null) { - this.requestedAddressTypes = new ArrayList<>(); - } - this.requestedAddressTypes.add(element); - return this; - } + @SerializedName("men_clothing") + MEN_CLOTHING("men_clothing"), - /** - * Add all elements to `requestedAddressTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} - * for the field documentation. - */ - public Builder addAllRequestedAddressType( - List< - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - elements) { - if (this.requestedAddressTypes == null) { - this.requestedAddressTypes = new ArrayList<>(); + @SerializedName("musical_instruments") + MUSICAL_INSTRUMENTS("musical_instruments"), + + @SerializedName("office_products") + OFFICE_PRODUCTS("office_products"), + + @SerializedName("patio_lawn_and_garden") + PATIO_LAWN_AND_GARDEN("patio_lawn_and_garden"), + + @SerializedName("pet_supplies") + PET_SUPPLIES("pet_supplies"), + + @SerializedName("shoes") + SHOES("shoes"), + + @SerializedName("software") + SOFTWARE("software"), + + @SerializedName("sports_and_outdoors") + SPORTS_AND_OUTDOORS("sports_and_outdoors"), + + @SerializedName("tools_and_home_improvement") + TOOLS_AND_HOME_IMPROVEMENT("tools_and_home_improvement"), + + @SerializedName("toys_and_games") + TOYS_AND_GAMES("toys_and_games"), + + @SerializedName("video_games") + VIDEO_GAMES("video_games"), + + @SerializedName("women_clothing") + WOMEN_CLOTHING("women_clothing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductCategory(String value) { + this.value = value; } - this.requestedAddressTypes.addAll(elements); - return this; } - /** - * Required. The list of bank transfer types that this PaymentIntent is - * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code - * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code - * us_bank_transfer}. - */ - public Builder setType( - PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer.Type - type) { - this.type = type; - return this; + public enum SellerRating implements ApiRequestParams.EnumParam { + @SerializedName("high") + HIGH("high"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("medium") + MEDIUM("medium"), + + @SerializedName("very_high") + VERY_HIGH("very_high"), + + @SerializedName("very_low") + VERY_LOW("very_low"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SellerRating(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class EuBankTransfer { - /** - * Required. The desired country code of the bank account information. - * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, - * or {@code NL}. - */ - @SerializedName("country") - String country; + public static class RoundTripReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; /** * Map of extra parameters for custom features not available in this client library. The @@ -21158,9 +33703,55 @@ public static class EuBankTransfer { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private EuBankTransfer(String country, Map extraParams) { - this.country = country; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private RoundTripReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } public static Builder builder() { @@ -21168,25 +33759,83 @@ public static Builder builder() { } public static class Builder { - private String country; + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; private Map extraParams; + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance> + insurances; + + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance - .BankTransfer.EuBankTransfer(this.country, this.extraParams); + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); } - /** - * Required. The desired country code of the bank account information. - * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, - * or {@code NL}. - */ - public Builder setCountry(String country) { - this.country = country; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure + departure) { + this.departure = departure; return this; } @@ -21194,7 +33843,7 @@ public Builder setCountry(String country) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -21209,7 +33858,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -21219,1972 +33868,1962 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } } - } - public enum RequestedAddressType implements ApiRequestParams.EnumParam { - @SerializedName("aba") - ABA("aba"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - @SerializedName("iban") - IBAN("iban"), + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; - @SerializedName("sepa") - SEPA("sepa"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("sort_code") - SORT_CODE("sort_code"), + private Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - @SerializedName("spei") - SPEI("spei"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("swift") - SWIFT("swift"), + public static class Builder { + private Address address; - @SerializedName("zengin") - ZENGIN("zengin"); + private String arrivalLocation; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - RequestedAddressType(String value) { - this.value = value; - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("eu_bank_transfer") - EU_BANK_TRANSFER("eu_bank_transfer"), + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - @SerializedName("gb_bank_transfer") - GB_BANK_TRANSFER("gb_bank_transfer"), + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - @SerializedName("jp_bank_transfer") - JP_BANK_TRANSFER("jp_bank_transfer"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("mx_bank_transfer") - MX_BANK_TRANSFER("mx_bank_transfer"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - @SerializedName("us_bank_transfer") - US_BANK_TRANSFER("us_bank_transfer"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - Type(String value) { - this.value = value; - } - } - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - public enum FundingType implements ApiRequestParams.EnumParam { - @SerializedName("bank_transfer") - BANK_TRANSFER("bank_transfer"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private String city; - FundingType(String value) { - this.value = value; - } - } + private String country; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class 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; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - public static Builder builder() { - return new Builder(); - } + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - public static class Builder { - private Map extraParams; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - private SetupFutureUsage setupFutureUsage; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Eps build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Eps( - this.extraParams, this.setupFutureUsage); - } + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = 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.PaymentMethodOptions.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; - } + public static Builder builder() { + return new Builder(); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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 static class Builder { + private Address address; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Eps.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private Long departsAt; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private String departureLocation; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Fpx { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 of the departure location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure.Address + address) { + this.address = address; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - public static class Builder { - private Map extraParams; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - private SetupFutureUsage setupFutureUsage; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Fpx build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Fpx( - this.extraParams, this.setupFutureUsage); - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Fpx#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Fpx#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + public static class Builder { + private String city; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Fpx.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private String country; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private String postalCode; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private String region; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Giropay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private String streetAddress; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + private String streetAddress2; - private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - public static Builder builder() { - return new Builder(); - } + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - public static class Builder { - private Map extraParams; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Giropay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Giropay( - this.extraParams, this.setupFutureUsage); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Giropay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Giropay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } } - this.extraParams.putAll(map); - return this; - } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Giropay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + public static Builder builder() { + return new Builder(); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Gopay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private String currency; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + private Map extraParams; - private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - public static class Builder { - private Map extraParams; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Gopay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Gopay( - this.extraParams, this.setupFutureUsage); - } + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Gopay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Gopay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Gopay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("emergency") + EMERGENCY("emergency"), - @SerializedName("off_session") - OFF_SESSION("off_session"); + @SerializedName("medical") + MEDICAL("medical"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + InsuranceType(String value) { + this.value = value; + } + } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Grabpay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - public static Builder builder() { - return new Builder(); - } + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - public static class Builder { - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private SetupFutureUsage setupFutureUsage; + public static class Builder { + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay( - this.extraParams, this.setupFutureUsage); - } + private String familyName; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private String givenName; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class IdBankTransfer { - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 - * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - */ - @SerializedName("expires_after") - Long expiresAfter; + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * now until 30 days from now. If unset, it defaults to 1 days from now. - */ - @SerializedName("expires_at") - Long expiresAt; + @SerializedName("economy") + ECONOMY("economy"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - private IdBankTransfer( - Long expiresAfter, - Long expiresAt, - Map extraParams, - SetupFutureUsage setupFutureUsage) { - this.expiresAfter = expiresAfter; - this.expiresAt = expiresAt; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + @Getter(onMethod_ = {@Override}) + private final String value; - public static Builder builder() { - return new Builder(); - } + TicketClass(String value) { + this.value = value; + } + } + } - public static class Builder { - private Long expiresAfter; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TrainReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; - private Long expiresAt; + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - private Map extraParams; + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; - private SetupFutureUsage setupFutureUsage; + /** Currency. */ + @SerializedName("currency") + String currency; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer( - this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); - } + /** Departure details. */ + @SerializedName("departure") + Departure departure; - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - */ - public Builder setExpiresAfter(Long expiresAfter) { - this.expiresAfter = expiresAfter; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * now until 30 days from now. If unset, it defaults to 1 days from now. - */ - public Builder setExpiresAt(Long expiresAt) { - this.expiresAt = expiresAt; - return this; - } + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance> + insurances; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private TrainReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances, + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + public static class Builder { + private String affiliateName; - @Getter(onMethod_ = {@Override}) - private final String value; + private Arrival arrival; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private String carrierName; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Ideal { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private String currency; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + private Departure departure; - private Ideal(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance> + insurances; - public static class Builder { - private Map extraParams; + private List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger> + passengers; - private ApiRequestParams.EnumParam setupFutureUsage; + private Long price; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Ideal build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Ideal( - this.extraParams, this.setupFutureUsage); - } + private TicketClass ticketClass; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Ideal#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Ideal#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Ideal.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** Arrival details. */ + public Builder setArrival( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival + arrival) { + this.arrival = arrival; + 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; - } - } + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** Departure details. */ + public Builder setDeparture( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure + departure) { + this.departure = departure; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#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 - @EqualsAndHashCode(callSuper = false) - public static class InteracPresent { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } - private InteracPresent(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * 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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger + element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - public static class Builder { - private Map extraParams; + /** + * 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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent( - this.extraParams); - } + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.InteracPresent#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KakaoPay { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply - * with regional legislation and network rules, such as SCA. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + public static Builder builder() { + return new Builder(); + } - private KakaoPay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + public static class Builder { + private Address address; - public static Builder builder() { - return new Builder(); - } + private String arrivalLocation; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Map extraParams; - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + public static Builder builder() { + return new Builder(); + } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + public static class Builder { + private String city; - @Getter(onMethod_ = {@Override}) - private final String value; + private String country; - CaptureMethod(String value) { - this.value = value; - } - } + private Map extraParams; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + private String postalCode; - @SerializedName("off_session") - OFF_SESSION("off_session"); + private String region; - @Getter(onMethod_ = {@Override}) - private final String value; + private String streetAddress; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private String streetAddress2; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Klarna { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** On-demand details if setting up or charging an on-demand payment. */ - @SerializedName("on_demand") - OnDemand onDemand; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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; + } - /** Preferred language of the Klarna authorization page that the customer is redirected to. */ - @SerializedName("preferred_locale") - PreferredLocale preferredLocale; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** Subscription details if setting up or charging a subscription. */ - @SerializedName("subscriptions") - Object subscriptions; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - private Klarna( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - OnDemand onDemand, - PreferredLocale preferredLocale, - SetupFutureUsage setupFutureUsage, - Object subscriptions) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.onDemand = onDemand; - this.preferredLocale = preferredLocale; - this.setupFutureUsage = setupFutureUsage; - this.subscriptions = subscriptions; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - private Map extraParams; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - private OnDemand onDemand; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - private PreferredLocale preferredLocale; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 SetupFutureUsage setupFutureUsage; + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - private Object subscriptions; + public static Builder builder() { + return new Builder(); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna( - this.captureMethod, - this.extraParams, - this.onDemand, - this.preferredLocale, - this.setupFutureUsage, - this.subscriptions); - } + public static class Builder { + private Address address; - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + private Long departsAt; - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + private String departureLocation; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Map extraParams; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - /** On-demand details if setting up or charging an on-demand payment. */ - public Builder setOnDemand( - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { - this.onDemand = onDemand; - return this; - } + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - /** - * Preferred language of the Klarna authorization page that the customer is redirected to. - */ - public Builder setPreferredLocale( - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.PreferredLocale - preferredLocale) { - this.preferredLocale = preferredLocale; - return this; - } + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - /** - * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#subscriptions} for the field - * documentation. - */ - @SuppressWarnings("unchecked") - public Builder addSubscription( - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription element) { - if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { - this.subscriptions = - new ArrayList< - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription>(); - } - ((List) - this.subscriptions) - .add(element); - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Add all elements to `subscriptions` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#subscriptions} for the - * field documentation. - */ - @SuppressWarnings("unchecked") - public Builder addAllSubscription( - List elements) { - if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { - this.subscriptions = - new ArrayList< - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription>(); - } - ((List) - this.subscriptions) - .addAll(elements); - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - /** Subscription details if setting up or charging a subscription. */ - public Builder setSubscriptions(EmptyParam subscriptions) { - this.subscriptions = subscriptions; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** Subscription details if setting up or charging a subscription. */ - public Builder setSubscriptions( - List - subscriptions) { - this.subscriptions = subscriptions; - return this; - } - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class OnDemand { - /** - * Your average amount value. You can use a value across your customer base, or segment - * based on customer type, country, etc. - */ - @SerializedName("average_amount") - Long averageAmount; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - /** - * The maximum value you may charge a customer per purchase. You can use a value across your - * customer base, or segment based on customer type, country, etc. - */ - @SerializedName("maximum_amount") - Long maximumAmount; + public static class Builder { + private String city; - /** - * The lowest or minimum value you may charge a customer per purchase. You can use a value - * across your customer base, or segment based on customer type, country, etc. - */ - @SerializedName("minimum_amount") - Long minimumAmount; + private String country; - /** Interval at which the customer is making purchases. */ - @SerializedName("purchase_interval") - PurchaseInterval purchaseInterval; + private Map extraParams; - /** The number of {@code purchase_interval} between charges. */ - @SerializedName("purchase_interval_count") - Long purchaseIntervalCount; + private String postalCode; - private OnDemand( - Long averageAmount, - Map extraParams, - Long maximumAmount, - Long minimumAmount, - PurchaseInterval purchaseInterval, - Long purchaseIntervalCount) { - this.averageAmount = averageAmount; - this.extraParams = extraParams; - this.maximumAmount = maximumAmount; - this.minimumAmount = minimumAmount; - this.purchaseInterval = purchaseInterval; - this.purchaseIntervalCount = purchaseIntervalCount; - } + private String region; - public static Builder builder() { - return new Builder(); - } + private String streetAddress; - public static class Builder { - private Long averageAmount; + private String streetAddress2; - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - private Long maximumAmount; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private Long minimumAmount; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private PurchaseInterval purchaseInterval; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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; + } - private Long purchaseIntervalCount; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand( - this.averageAmount, - this.extraParams, - this.maximumAmount, - this.minimumAmount, - this.purchaseInterval, - this.purchaseIntervalCount); - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Your average amount value. You can use a value across your customer base, or segment - * based on customer type, country, etc. - */ - public Builder setAverageAmount(Long averageAmount) { - this.averageAmount = averageAmount; - return this; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } } - this.extraParams.putAll(map); - return this; } - /** - * The maximum value you may charge a customer per purchase. You can use a value across - * your customer base, or segment based on customer type, country, etc. - */ - public Builder setMaximumAmount(Long maximumAmount) { - this.maximumAmount = maximumAmount; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - /** - * The lowest or minimum value you may charge a customer per purchase. You can use a value - * across your customer base, or segment based on customer type, country, etc. - */ - public Builder setMinimumAmount(Long minimumAmount) { - this.minimumAmount = minimumAmount; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Interval at which the customer is making purchases. */ - public Builder setPurchaseInterval( - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval - purchaseInterval) { - this.purchaseInterval = purchaseInterval; - return this; - } + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - /** The number of {@code purchase_interval} between charges. */ - public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { - this.purchaseIntervalCount = purchaseIntervalCount; - return this; - } - } + public static Builder builder() { + return new Builder(); + } - public enum PurchaseInterval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + public static class Builder { + private String currency; - @SerializedName("month") - MONTH("month"), + private Map extraParams; - @SerializedName("week") - WEEK("week"), + private String insuranceCompanyName; - @SerializedName("year") - YEAR("year"); + private InsuranceType insuranceType; - @Getter(onMethod_ = {@Override}) - private final String value; + private Long price; - PurchaseInterval(String value) { - this.value = value; - } - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Subscription { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** Required. Unit of time between subscription charges. */ - @SerializedName("interval") - Interval interval; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * The number of intervals (specified in the {@code interval} attribute) between - * subscription charges. For example, {@code interval=month} and {@code interval_count=3} - * charges every 3 months. - */ - @SerializedName("interval_count") - Long intervalCount; + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** Name for subscription. */ - @SerializedName("name") - String name; + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - /** Describes the upcoming charge for this subscription. */ - @SerializedName("next_billing") - NextBilling nextBilling; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** - * Required. A non-customer-facing reference to correlate subscription - * charges in the Klarna app. Use a value that persists across subscription charges. - */ - @SerializedName("reference") - String reference; + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - private Subscription( - Map extraParams, - Interval interval, - Long intervalCount, - String name, - NextBilling nextBilling, - String reference) { - this.extraParams = extraParams; - this.interval = interval; - this.intervalCount = intervalCount; - this.name = name; - this.nextBilling = nextBilling; - this.reference = reference; - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("emergency") + EMERGENCY("emergency"), - public static class Builder { - private Map extraParams; + @SerializedName("medical") + MEDICAL("medical"); - private Interval interval; + @Getter(onMethod_ = {@Override}) + private final String value; - private Long intervalCount; + InsuranceType(String value) { + this.value = value; + } + } + } - private String name; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - private NextBilling nextBilling; + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - private String reference; + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription( - this.extraParams, - this.interval, - this.intervalCount, - this.name, - this.nextBilling, - this.reference); - } + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static class Builder { + private Map extraParams; + + private String familyName; + + private String givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } } - this.extraParams.putAll(map); - return this; } - /** Required. Unit of time between subscription charges. */ - public Builder setInterval( - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.Interval - interval) { - this.interval = interval; - return this; - } + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * The number of intervals (specified in the {@code interval} attribute) between - * subscription charges. For example, {@code interval=month} and {@code interval_count=3} - * charges every 3 months. - */ - public Builder setIntervalCount(Long intervalCount) { - this.intervalCount = intervalCount; - return this; - } + @SerializedName("economy") + ECONOMY("economy"), - /** Name for subscription. */ - public Builder setName(String name) { - this.name = name; - return this; - } + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** Describes the upcoming charge for this subscription. */ - public Builder setNextBilling( - PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling - nextBilling) { - this.nextBilling = nextBilling; - return this; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * Required. A non-customer-facing reference to correlate subscription - * charges in the Klarna app. Use a value that persists across subscription charges. - */ - public Builder setReference(String reference) { - this.reference = reference; - return this; + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class NextBilling { - /** Required. The amount of the next charge for the subscription. */ - @SerializedName("amount") - Long amount; + public static class Voucher { + /** Name of associated or partner company for this voucher. */ + @SerializedName("affiliate_name") + String affiliateName; - /** - * Required. The date of the next charge for the subscription in - * YYYY-MM-DD format. - */ - @SerializedName("date") - String date; + /** The voucher validity end time. */ + @SerializedName("ends_at") + Long endsAt; /** * Map of extra parameters for custom features not available in this client library. The @@ -23196,10 +35835,37 @@ public static class NextBilling { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private NextBilling(Long amount, String date, Map extraParams) { - this.amount = amount; - this.date = date; + /** The voucher validity start time. */ + @SerializedName("starts_at") + Long startsAt; + + /** The issuer or provider of this voucher. */ + @SerializedName("voucher_company") + String voucherCompany; + + /** The name or reference to identify the voucher. */ + @SerializedName("voucher_name") + String voucherName; + + /** The type of this voucher. */ + @SerializedName("voucher_type") + VoucherType voucherType; + + private Voucher( + String affiliateName, + Long endsAt, + Map extraParams, + Long startsAt, + String voucherCompany, + String voucherName, + VoucherType voucherType) { + this.affiliateName = affiliateName; + this.endsAt = endsAt; this.extraParams = extraParams; + this.startsAt = startsAt; + this.voucherCompany = voucherCompany; + this.voucherName = voucherName; + this.voucherType = voucherType; } public static Builder builder() { @@ -23207,31 +35873,44 @@ public static Builder builder() { } public static class Builder { - private Long amount; + private String affiliateName; - private String date; + private Long endsAt; private Map extraParams; + private Long startsAt; + + private String voucherCompany; + + private String voucherName; + + private VoucherType voucherType; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription - .NextBilling(this.amount, this.date, this.extraParams); + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher( + this.affiliateName, + this.endsAt, + this.extraParams, + this.startsAt, + this.voucherCompany, + this.voucherName, + this.voucherType); } - /** Required. The amount of the next charge for the subscription. */ - public Builder setAmount(Long amount) { - this.amount = amount; + /** Name of associated or partner company for this voucher. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; return this; } - /** - * Required. The date of the next charge for the subscription in - * YYYY-MM-DD format. - */ - public Builder setDate(String date) { - this.date = date; + /** The voucher validity end time. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; return this; } @@ -23239,7 +35918,7 @@ public Builder setDate(String date) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -23254,7 +35933,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -23264,27 +35943,57 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The voucher validity start time. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + + /** The issuer or provider of this voucher. */ + public Builder setVoucherCompany(String voucherCompany) { + this.voucherCompany = voucherCompany; + return this; + } + + /** The name or reference to identify the voucher. */ + public Builder setVoucherName(String voucherName) { + this.voucherName = voucherName; + return this; + } + + /** The type of this voucher. */ + public Builder setVoucherType( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher.VoucherType + voucherType) { + this.voucherType = voucherType; + return this; + } } - } - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + public enum VoucherType implements ApiRequestParams.EnumParam { + @SerializedName("digital_product") + DIGITAL_PRODUCT("digital_product"), - @SerializedName("month") - MONTH("month"), + @SerializedName("discount") + DISCOUNT("discount"), - @SerializedName("week") - WEEK("week"), + @SerializedName("gift_card") + GIFT_CARD("gift_card"), - @SerializedName("year") - YEAR("year"); + @SerializedName("physical_product") + PHYSICAL_PRODUCT("physical_product"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("services") + SERVICES("services"); - Interval(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + VoucherType(String value) { + this.value = value; + } } } } diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 28da62c1da8..fbe66e3ab87 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -3180,6 +3180,10 @@ public static class PaymentDetails { @SerializedName("car_rental") CarRental carRental; + /** Car rental data for this PaymentIntent. */ + @SerializedName("car_rental_data") + Object carRentalData; + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -3206,10 +3210,18 @@ public static class PaymentDetails { @SerializedName("flight") Flight flight; + /** Flight data for this PaymentIntent. */ + @SerializedName("flight_data") + Object flightData; + /** Lodging reservation details for this PaymentIntent. */ @SerializedName("lodging") Lodging lodging; + /** Lodging data for this PaymentIntent. */ + @SerializedName("lodging_data") + Object lodgingData; + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -3231,19 +3243,25 @@ public static class PaymentDetails { private PaymentDetails( CarRental carRental, + Object carRentalData, Object customerReference, EventDetails eventDetails, Map extraParams, Flight flight, + Object flightData, Lodging lodging, + Object lodgingData, Object orderReference, Subscription subscription) { this.carRental = carRental; + this.carRentalData = carRentalData; this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; this.flight = flight; + this.flightData = flightData; this.lodging = lodging; + this.lodgingData = lodgingData; this.orderReference = orderReference; this.subscription = subscription; } @@ -3255,6 +3273,8 @@ public static Builder builder() { public static class Builder { private CarRental carRental; + private Object carRentalData; + private Object customerReference; private EventDetails eventDetails; @@ -3263,8 +3283,12 @@ public static class Builder { private Flight flight; + private Object flightData; + private Lodging lodging; + private Object lodgingData; + private Object orderReference; private Subscription subscription; @@ -3273,11 +3297,14 @@ public static class Builder { public PaymentIntentCreateParams.PaymentDetails build() { return new PaymentIntentCreateParams.PaymentDetails( this.carRental, + this.carRentalData, this.customerReference, this.eventDetails, this.extraParams, this.flight, + this.flightData, this.lodging, + this.lodgingData, this.orderReference, this.subscription); } @@ -3288,6 +3315,53 @@ public Builder setCarRental(PaymentIntentCreateParams.PaymentDetails.CarRental c return this; } + /** + * Add an element to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCarRentalData( + PaymentIntentCreateParams.PaymentDetails.CarRentalData element) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = + new ArrayList(); + } + ((List) this.carRentalData) + .add(element); + return this; + } + + /** + * Add all elements to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCarRentalData( + List elements) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = + new ArrayList(); + } + ((List) this.carRentalData) + .addAll(elements); + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData(EmptyParam carRentalData) { + this.carRentalData = carRentalData; + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData( + List carRentalData) { + this.carRentalData = carRentalData; + return this; + } + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -3350,12 +3424,99 @@ public Builder setFlight(PaymentIntentCreateParams.PaymentDetails.Flight flight) return this; } + /** + * Add an element to `flightData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFlightData(PaymentIntentCreateParams.PaymentDetails.FlightData element) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData).add(element); + return this; + } + + /** + * Add all elements to `flightData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFlightData( + List elements) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData) + .addAll(elements); + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData(EmptyParam flightData) { + this.flightData = flightData; + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData( + List flightData) { + this.flightData = flightData; + return this; + } + /** Lodging reservation details for this PaymentIntent. */ public Builder setLodging(PaymentIntentCreateParams.PaymentDetails.Lodging lodging) { this.lodging = lodging; return this; } + /** + * Add an element to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLodgingData(PaymentIntentCreateParams.PaymentDetails.LodgingData element) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData) + .add(element); + return this; + } + + /** + * Add all elements to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLodgingData( + List elements) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData) + .addAll(elements); + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData(EmptyParam lodgingData) { + this.lodgingData = lodgingData; + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData( + List lodgingData) { + this.lodgingData = lodgingData; + return this; + } + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -4743,30 +4904,38 @@ public enum RateInterval implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - 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. */ + public static class CarRentalData { + /** Affiliate (such as travel agency) details for the rental. */ @SerializedName("affiliate") Affiliate affiliate; - /** The name of the company. */ - @SerializedName("company") - String company; + /** Booking confirmation number for the car rental. */ + @SerializedName("booking_number") + String bookingNumber; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** Name of the car rental company. */ + @SerializedName("carrier_name") + String carrierName; - /** Event end time. Measured in seconds since the Unix epoch. */ - @SerializedName("ends_at") - Long endsAt; + /** Customer service phone number for the car rental company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** Number of days the car is being rented. */ + @SerializedName("days_rented") + Long daysRented; + + /** Distance details for the rental. */ + @SerializedName("distance") + Distance distance; + + /** List of drivers for the rental. */ + @SerializedName("drivers") + List drivers; + + /** Required. Drop-off location details. */ + @SerializedName("drop_off") + DropOff dropOff; /** * Map of extra parameters for custom features not available in this client library. The @@ -4777,39 +4946,61 @@ public static class EventDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Type of the event entertainment (concert, sports event etc). */ - @SerializedName("genre") - String genre; + /** Insurance details for the rental. */ + @SerializedName("insurances") + List insurances; - /** Required. The name of the event. */ - @SerializedName("name") - String name; + /** Indicates if the customer was a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; - /** Event start time. Measured in seconds since the Unix epoch. */ - @SerializedName("starts_at") - Long startsAt; + /** Required. Pickup location details. */ + @SerializedName("pickup") + Pickup pickup; - private EventDetails( - Boolean accessControlledVenue, - Address address, + /** Name of the person renting the vehicle. */ + @SerializedName("renter_name") + String renterName; + + /** Required. Total cost breakdown for the rental. */ + @SerializedName("total") + Total total; + + /** Vehicle details for the rental. */ + @SerializedName("vehicle") + Vehicle vehicle; + + private CarRentalData( Affiliate affiliate, - String company, - Delivery delivery, - Long endsAt, + String bookingNumber, + String carrierName, + String customerServicePhoneNumber, + Long daysRented, + Distance distance, + List drivers, + DropOff dropOff, Map extraParams, - String genre, - String name, - Long startsAt) { - this.accessControlledVenue = accessControlledVenue; - this.address = address; + List insurances, + Boolean noShowIndicator, + Pickup pickup, + String renterName, + Total total, + Vehicle vehicle) { this.affiliate = affiliate; - this.company = company; - this.delivery = delivery; - this.endsAt = endsAt; + this.bookingNumber = bookingNumber; + this.carrierName = carrierName; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.daysRented = daysRented; + this.distance = distance; + this.drivers = drivers; + this.dropOff = dropOff; this.extraParams = extraParams; - this.genre = genre; - this.name = name; - this.startsAt = startsAt; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.pickup = pickup; + this.renterName = renterName; + this.total = total; + this.vehicle = vehicle; } public static Builder builder() { @@ -4817,84 +5008,135 @@ public static Builder builder() { } public static class Builder { - private Boolean accessControlledVenue; + private Affiliate affiliate; - private Address address; + private String bookingNumber; - private Affiliate affiliate; + private String carrierName; - private String company; + private String customerServicePhoneNumber; - private Delivery delivery; + private Long daysRented; - private Long endsAt; + private Distance distance; + + private List drivers; + + private DropOff dropOff; private Map extraParams; - private String genre; + private List insurances; - private String name; + private Boolean noShowIndicator; - private Long startsAt; + private Pickup pickup; + + private String renterName; + + private Total total; + + private Vehicle vehicle; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.EventDetails build() { - return new PaymentIntentCreateParams.PaymentDetails.EventDetails( - this.accessControlledVenue, - this.address, + public PaymentIntentCreateParams.PaymentDetails.CarRentalData build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData( this.affiliate, - this.company, - this.delivery, - this.endsAt, + this.bookingNumber, + this.carrierName, + this.customerServicePhoneNumber, + this.daysRented, + this.distance, + this.drivers, + this.dropOff, this.extraParams, - this.genre, - this.name, - this.startsAt); + this.insurances, + this.noShowIndicator, + this.pickup, + this.renterName, + this.total, + this.vehicle); } - /** Indicates if the tickets are digitally checked when entering the venue. */ - public Builder setAccessControlledVenue(Boolean accessControlledVenue) { - this.accessControlledVenue = accessControlledVenue; + /** Affiliate (such as travel agency) details for the rental. */ + public Builder setAffiliate( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - /** The event location's address. */ - public Builder setAddress( - PaymentIntentCreateParams.PaymentDetails.EventDetails.Address address) { - this.address = address; + /** Booking confirmation number for the car rental. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate affiliate) { - this.affiliate = affiliate; + /** Name of the car rental company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; return this; } - /** The name of the company. */ - public Builder setCompany(String company) { - this.company = company; + /** Customer service phone number for the car rental company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; return this; } - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery delivery) { - this.delivery = delivery; + /** Number of days the car is being rented. */ + public Builder setDaysRented(Long daysRented) { + this.daysRented = daysRented; return this; } - /** Event end time. Measured in seconds since the Unix epoch. */ - public Builder setEndsAt(Long endsAt) { - this.endsAt = endsAt; + /** Distance details for the rental. */ + public Builder setDistance( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Distance distance) { + this.distance = distance; + 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 + * PaymentIntentCreateParams.PaymentDetails.CarRentalData#drivers} for the field + * documentation. + */ + public Builder addDriver( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.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 + * PaymentIntentCreateParams.PaymentDetails.CarRentalData#drivers} for the field + * documentation. + */ + public Builder addAllDriver( + List elements) { + if (this.drivers == null) { + this.drivers = new ArrayList<>(); + } + this.drivers.addAll(elements); + return this; + } + + /** Required. Drop-off location details. */ + public Builder setDropOff( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff dropOff) { + this.dropOff = dropOff; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.EventDetails#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentDetails.CarRentalData#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4908,7 +5150,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.EventDetails#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentDetails.CarRentalData#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4919,38 +5161,76 @@ public Builder putAllExtraParam(Map 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; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** Event start time. Measured in seconds since the Unix epoch. */ - public Builder setStartsAt(Long startsAt) { - this.startsAt = startsAt; + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Indicates if the customer was a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } + + /** Required. Pickup location details. */ + public Builder setPickup( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup pickup) { + this.pickup = pickup; + return this; + } + + /** Name of the person renting the vehicle. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total cost breakdown for the rental. */ + public Builder setTotal( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total total) { + this.total = total; + return this; + } + + /** Vehicle details for the rental. */ + public Builder setVehicle( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Vehicle vehicle) { + this.vehicle = vehicle; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - 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; + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; /** * Map of extra parameters for custom features not available in this client library. The @@ -4962,37 +5242,14 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the 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; + /** Name of affiliate partner. */ + @SerializedName("name") + String name; - private Address( - String city, - String country, - Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + private Affiliate(String code, Map extraParams, String name) { + this.code = code; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.name = name; } public static Builder builder() { @@ -5000,44 +5257,21 @@ public static Builder builder() { } public static class Builder { - private String city; - - private String country; + private String code; private Map extraParams; - private String line1; - - private String line2; - - private String postalCode; - - private String state; + private String name; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.EventDetails.Address build() { - return new PaymentIntentCreateParams.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; + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Affiliate build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Affiliate( + this.code, this.extraParams, this.name); } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; return this; } @@ -5045,7 +5279,7 @@ public Builder setCountry(String country) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.EventDetails.Address#extraParams} for the + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Affiliate#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5060,7 +5294,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.EventDetails.Address#extraParams} for the + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Affiliate#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5071,27 +5305,9 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } - - /** Address line 2, such as the 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; + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; return this; } } @@ -5099,7 +5315,11 @@ public Builder setState(String state) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Distance { + /** Required. Distance traveled. */ + @SerializedName("amount") + Long amount; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5110,13 +5330,17 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + @SerializedName("unit") + Unit unit; - private Affiliate(Map extraParams, String name) { + private Distance(Long amount, Map extraParams, Unit unit) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; + this.unit = unit; } public static Builder builder() { @@ -5124,21 +5348,29 @@ public static Builder builder() { } public static class Builder { + private Long amount; + private Map extraParams; - private String name; + private Unit unit; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate build() { - return new PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate( - this.extraParams, this.name); + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Distance build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Distance( + this.amount, this.extraParams, this.unit); + } + + /** Required. Distance traveled. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Distance#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5153,7 +5385,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Distance#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5164,17 +5396,48 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + public Builder setUnit( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Distance.Unit unit) { + this.unit = unit; return this; } } + + public enum Unit implements ApiRequestParams.EnumParam { + @SerializedName("kilometers") + KILOMETERS("kilometers"), + + @SerializedName("miles") + MILES("miles"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Unit(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Driver { + /** Driver's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Driver's identification number. */ + @SerializedName("driver_identification_number") + String driverIdentificationNumber; + + /** Driver's tax number. */ + @SerializedName("driver_tax_number") + String driverTaxNumber; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5185,18 +5448,21 @@ public static class Delivery { @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; + /** Required. Driver's full name. */ + @SerializedName("name") + String name; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Driver( + DateOfBirth dateOfBirth, + String driverIdentificationNumber, + String driverTaxNumber, + Map extraParams, + String name) { + this.dateOfBirth = dateOfBirth; + this.driverIdentificationNumber = driverIdentificationNumber; + this.driverTaxNumber = driverTaxNumber; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.name = name; } public static Builder builder() { @@ -5204,23 +5470,51 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; + private DateOfBirth dateOfBirth; - private Mode mode; + private String driverIdentificationNumber; - private Recipient recipient; + private String driverTaxNumber; + + private Map extraParams; + + private String name; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery build() { - return new PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery( - this.extraParams, this.mode, this.recipient); + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver( + this.dateOfBirth, + this.driverIdentificationNumber, + this.driverTaxNumber, + this.extraParams, + this.name); + } + + /** Driver's date of birth. */ + public Builder setDateOfBirth( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth + dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Driver's identification number. */ + public Builder setDriverIdentificationNumber(String driverIdentificationNumber) { + this.driverIdentificationNumber = driverIdentificationNumber; + return this; + } + + /** Driver's tax number. */ + public Builder setDriverTaxNumber(String driverTaxNumber) { + this.driverTaxNumber = driverTaxNumber; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5235,7 +5529,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5246,27 +5540,19 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Mode mode) { - this.mode = mode; - return this; - } - - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Driver's full name. */ + public Builder setName(String name) { + this.name = name; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class DateOfBirth { + /** Required. Day of birth (1-31). */ + @SerializedName("day") + Long day; /** * Map of extra parameters for custom features not available in this client library. The @@ -5278,20 +5564,19 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + /** Required. Month of birth (1-12). */ + @SerializedName("month") + Long month; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + /** Required. Year of birth (must be greater than 1900). */ + @SerializedName("year") + Long year; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.month = month; + this.year = year; } public static Builder builder() { @@ -5299,24 +5584,24 @@ public static Builder builder() { } public static class Builder { - private String email; + private Long day; private Map extraParams; - private String name; + private Long month; - private String phone; + private Long year; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth build() { - return new PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth( + this.day, this.extraParams, this.month, this.year); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. Day of birth (1-31). */ + public Builder setDay(Long day) { + this.day = day; return this; } @@ -5324,7 +5609,7 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5339,7 +5624,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5350,282 +5635,299 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** Required. Month of birth (1-12). */ + public Builder setMonth(Long month) { + this.month = month; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Required. Year of birth (must be greater than 1900). */ + public Builder setYear(Long year) { + this.year = year; return this; } } } + } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DropOff { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; - @SerializedName("phone") - PHONE("phone"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Location name. */ + @SerializedName("location_name") + String locationName; - @SerializedName("post") - POST("post"); + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - @Getter(onMethod_ = {@Override}) - private final String value; + private DropOff( + Address address, Map extraParams, String locationName, Long time) { + this.address = address; + this.extraParams = extraParams; + this.locationName = locationName; + this.time = time; + } - Mode(String value) { - this.value = value; - } + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Flight { - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + public static class Builder { + private Address address; - /** - * 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; + private Map extraParams; - /** - * The International Air Transport Association (IATA) carrier code of the carrier that issued - * the ticket. - */ - @SerializedName("carrier") - String carrier; + private String locationName; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + private Long time; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff( + this.address, this.extraParams, this.locationName, this.time); + } - /** The name of the person or entity on the reservation. */ - @SerializedName("passenger_name") - String passengerName; + /** Required. Address of the rental location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff.Address address) { + this.address = address; + return this; + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Required. The individual flight segments associated with the trip. */ - @SerializedName("segments") - List segments; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff#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 ticket number associated with the travel reservation. */ - @SerializedName("ticket_number") - String ticketNumber; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; + return this; + } - 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; - } + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; + return this; + } + } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - public static class Builder { - private Affiliate affiliate; + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - private String agencyNumber; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 String carrier; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - private Delivery delivery; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Map extraParams; + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; - private String passengerName; + /** State, county, province, or region. */ + @SerializedName("state") + String state; - private List passengers; + 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; + } - private List segments; + public static Builder builder() { + return new Builder(); + } - private String ticketNumber; + public static class Builder { + private String city; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Flight build() { - return new PaymentIntentCreateParams.PaymentDetails.Flight( - this.affiliate, - this.agencyNumber, - this.carrier, - this.delivery, - this.extraParams, - this.passengerName, - this.passengers, - this.segments, - this.ticketNumber); - } + private String country; - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + private Map extraParams; - /** - * 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; - } + private String line1; - /** - * 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; - } + private String line2; - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentCreateParams.PaymentDetails.Flight.Delivery delivery) { - this.delivery = delivery; - return this; - } + private String postalCode; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + private String state; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff.Address build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - /** The name of the person or entity on the reservation. */ - public Builder setPassengerName(String passengerName) { - this.passengerName = passengerName; - return this; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + 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 - * PaymentIntentCreateParams.PaymentDetails.Flight#passengers} for the field documentation. - */ - public Builder addPassenger( - PaymentIntentCreateParams.PaymentDetails.Flight.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.add(element); - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + 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 - * PaymentIntentCreateParams.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 a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff.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 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 - * PaymentIntentCreateParams.PaymentDetails.Flight#segments} for the field documentation. - */ - public Builder addSegment(PaymentIntentCreateParams.PaymentDetails.Flight.Segment element) { - if (this.segments == null) { - this.segments = new ArrayList<>(); - } - this.segments.add(element); - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.DropOff.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; + } - /** - * 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 - * PaymentIntentCreateParams.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; - } + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } - /** The ticket number associated with the travel reservation. */ - public Builder setTicketNumber(String ticketNumber) { - this.ticketNumber = ticketNumber; - return this; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Required. 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 @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Insurance { + /** Required. Amount of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5636,13 +5938,25 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - private Affiliate(Map extraParams, String name) { + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.name = name; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { @@ -5650,21 +5964,44 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private String currency; + private Map extraParams; - private String name; + private String insuranceCompanyName; + + private InsuranceType insuranceType; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate build() { - return new PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate( - this.extraParams, this.name); + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Insurance build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Amount of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Insurance#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5677,8 +6014,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Insurance#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5688,17 +6026,56 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; return this; } } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("liability_supplement") + LIABILITY_SUPPLEMENT("liability_supplement"), + + @SerializedName("loss_damage_waiver") + LOSS_DAMAGE_WAIVER("loss_damage_waiver"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_damage_waiver") + PARTIAL_DAMAGE_WAIVER("partial_damage_waiver"), + + @SerializedName("personal_accident") + PERSONAL_ACCIDENT("personal_accident"), + + @SerializedName("personal_effects") + PERSONAL_EFFECTS("personal_effects"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Pickup { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5709,18 +6086,20 @@ public static class Delivery { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** Location name. */ + @SerializedName("location_name") + String locationName; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Pickup( + Address address, Map extraParams, String locationName, Long time) { + this.address = address; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.locationName = locationName; + this.time = time; } public static Builder builder() { @@ -5728,23 +6107,33 @@ public static Builder builder() { } public static class Builder { + private Address address; + private Map extraParams; - private Mode mode; + private String locationName; - private Recipient recipient; + private Long time; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Flight.Delivery build() { - return new PaymentIntentCreateParams.PaymentDetails.Flight.Delivery( - this.extraParams, this.mode, this.recipient); + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup( + this.address, this.extraParams, this.locationName, this.time); + } + + /** Required. Address of the rental location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup.Address address) { + this.address = address; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Flight.Delivery#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5757,8 +6146,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Flight.Delivery#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5768,27 +6158,32 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Mode mode) { - this.mode = mode; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; return this; } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. 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 @@ -5800,20 +6195,39 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; + /** Required. 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.name = name; - this.phone = phone; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } public static Builder builder() { @@ -5821,23 +6235,44 @@ public static Builder builder() { } public static class Builder { - private String email; + private String city; + + private String country; private Map extraParams; - private String name; + private String line1; - private String phone; + private String line2; + + private String postalCode; + + private String state; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient build() { - return new PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup.Address build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; return this; } @@ -5845,8 +6280,8 @@ public Builder setEmail(String email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5860,8 +6295,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5871,45 +6306,55 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; 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; + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - Mode(String value) { - this.value = value; + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Passenger { + public static class Total { + /** Required. Total amount in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the amount. */ + @SerializedName("currency") + String currency; + + /** Discount details for the rental. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the rental. */ + @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. @@ -5920,15 +6365,36 @@ public static class Passenger { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. Full name of the person or entity on the flight reservation. - */ - @SerializedName("name") - String name; + /** Rate per unit for the rental. */ + @SerializedName("rate_per_unit") + Long ratePerUnit; - private Passenger(Map extraParams, String name) { + /** Unit of measurement for the rate. */ + @SerializedName("rate_unit") + RateUnit rateUnit; + + /** Tax breakdown for the rental. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + String currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Long ratePerUnit, + RateUnit rateUnit, + Tax tax) { + this.amount = amount; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.name = name; + this.ratePerUnit = ratePerUnit; + this.rateUnit = rateUnit; + this.tax = tax; } public static Builder builder() { @@ -5936,21 +6402,92 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private String currency; + + private Discounts discounts; + + private List + extraCharges; + private Map extraParams; - private String name; + private Long ratePerUnit; + + private RateUnit rateUnit; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Flight.Passenger build() { - return new PaymentIntentCreateParams.PaymentDetails.Flight.Passenger( - this.extraParams, this.name); + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total( + this.amount, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.ratePerUnit, + this.rateUnit, + this.tax); + } + + /** Required. Total amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details for the rental. */ + public Builder setDiscounts( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total#extraCharges} for the + * field documentation. + */ + public Builder addExtraCharge( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.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 PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total#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 PaymentIntentCreateParams.PaymentDetails.Flight.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5963,8 +6500,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Flight.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5974,1128 +6512,1008 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Full name of the person or entity on the flight reservation. - */ - public Builder setName(String name) { - this.name = name; + /** Rate per unit for the rental. */ + public Builder setRatePerUnit(Long ratePerUnit) { + this.ratePerUnit = ratePerUnit; return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** Unit of measurement for the rate. */ + public Builder setRateUnit( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.RateUnit rateUnit) { + this.rateUnit = rateUnit; + return this; + } - /** - * Required. The departure time for the flight segment. Measured in seconds - * since the Unix epoch. - */ - @SerializedName("departs_at") - Long departsAt; + /** Tax breakdown for the rental. */ + public Builder setTax( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax tax) { + this.tax = tax; + return this; + } + } - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - @SerializedName("departure_airport") - String departureAirport; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Coupon code applied to the rental. */ + @SerializedName("coupon") + String coupon; - /** The flight number associated with the segment. */ - @SerializedName("flight_number") - String flightNumber; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 fare class for the segment. */ - @SerializedName("service_class") - ServiceClass serviceClass; + /** Maximum number of free miles or kilometers included. */ + @SerializedName("maximum_free_miles_or_kilometers") + Long maximumFreeMilesOrKilometers; - 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; - } + private Discounts( + String corporateClientCode, + String coupon, + Map extraParams, + Long maximumFreeMilesOrKilometers) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + } - public static Builder builder() { - return new Builder(); - } + public static Builder builder() { + return new Builder(); + } - public static class Builder { - private Long amount; + public static class Builder { + private String corporateClientCode; - private String arrivalAirport; + private String coupon; - private Long arrivesAt; + private Map extraParams; - private String carrier; + private Long maximumFreeMilesOrKilometers; - private Long departsAt; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Discounts build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Discounts( + this.corporateClientCode, + this.coupon, + this.extraParams, + this.maximumFreeMilesOrKilometers); + } - private String departureAirport; + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - private Map extraParams; + /** Coupon code applied to the rental. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } - private String flightNumber; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private ServiceClass serviceClass; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Flight.Segment build() { - return new PaymentIntentCreateParams.PaymentDetails.Flight.Segment( - this.amount, - this.arrivalAirport, - this.arrivesAt, - this.carrier, - this.departsAt, - this.departureAirport, - this.extraParams, - this.flightNumber, - this.serviceClass); + /** Maximum number of free miles or kilometers included. */ + public Builder setMaximumFreeMilesOrKilometers(Long maximumFreeMilesOrKilometers) { + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + return this; + } } + } - /** The flight segment amount. */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Required. Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; /** - * The International Air Transport Association (IATA) airport code for the arrival - * airport. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. */ - public Builder setArrivalAirport(String arrivalAirport) { - this.arrivalAirport = arrivalAirport; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ - public Builder setArrivesAt(Long arrivesAt) { - this.arrivesAt = arrivesAt; - return this; - } + /** Required. Type of extra charge. */ + @SerializedName("type") + Type type; - /** - * 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; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - public Builder setDepartureAirport(String departureAirport) { - this.departureAirport = departureAirport; - return this; - } + public static class Builder { + private Long amount; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + private Map extraParams; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Flight.Segment#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.ExtraCharge + build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); } - this.extraParams.putAll(map); - return this; - } - /** The flight number associated with the segment. */ - public Builder setFlightNumber(String flightNumber) { - this.flightNumber = flightNumber; - return this; - } + /** Required. Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** The fare class for the segment. */ - public Builder setServiceClass( - PaymentIntentCreateParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { - this.serviceClass = serviceClass; - return this; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.ExtraCharge#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. Type of extra charge. */ + public Builder setType( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.ExtraCharge.Type + type) { + this.type = type; + return this; + } } - } - public enum ServiceClass implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("extra_mileage") + EXTRA_MILEAGE("extra_mileage"), - @SerializedName("economy") - ECONOMY("economy"), + @SerializedName("gas") + GAS("gas"), - @SerializedName("first") - FIRST("first"), + @SerializedName("gps") + GPS("gps"), - @SerializedName("premium_economy") - PREMIUM_ECONOMY("premium_economy"); + @SerializedName("late_charge") + LATE_CHARGE("late_charge"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("one_way_drop_off") + ONE_WAY_DROP_OFF("one_way_drop_off"), - ServiceClass(String value) { - this.value = value; + @SerializedName("other") + OTHER("other"), + + @SerializedName("parking") + PARKING("parking"), + + @SerializedName("phone") + PHONE("phone"), + + @SerializedName("regular_mileage") + REGULAR_MILEAGE("regular_mileage"), + + @SerializedName("towing") + TOWING("towing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Lodging { - /** The lodging location's address. */ - @SerializedName("address") - Address address; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 number of adults on the booking. */ - @SerializedName("adults") - Long adults; + /** Indicates if the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; - /** The booking number associated with the lodging reservation. */ - @SerializedName("booking_number") - String bookingNumber; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - /** The lodging category. */ - @SerializedName("category") - Category category; + public static Builder builder() { + return new Builder(); + } - /** - * Required. Lodging check-in time. Measured in seconds since the Unix epoch. - */ - @SerializedName("checkin_at") - Long checkinAt; + public static class Builder { + private Map extraParams; - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - @SerializedName("checkout_at") - Long checkoutAt; + private Boolean taxExemptIndicator; - /** The customer service phone number of the lodging company. */ - @SerializedName("customer_service_phone_number") - String customerServicePhoneNumber; + private List + taxes; - /** The daily lodging room rate. */ - @SerializedName("daily_room_rate_amount") - Long dailyRoomRateAmount; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.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; + } - /** List of additional charges being billed. */ - @SerializedName("extra_charges") - List extraCharges; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.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; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } - /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ - @SerializedName("fire_safety_act_compliance") - Boolean fireSafetyActCompliance; + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - /** The name of the lodging location. */ - @SerializedName("name") - String name; + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List + elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } - /** - * Indicates if the customer did not keep their booking while failing to cancel the - * reservation. - */ - @SerializedName("no_show") - Boolean noShow; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; - /** The number of rooms on the booking. */ - @SerializedName("number_of_rooms") - Long numberOfRooms; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** Tax rate applied. */ + @SerializedName("rate") + Long rate; - /** The phone number of the lodging location. */ - @SerializedName("property_phone_number") - String propertyPhoneNumber; + /** Type of tax applied. */ + @SerializedName("type") + String type; - /** The room class for this purchase. */ - @SerializedName("room_class") - String roomClass; + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - /** The number of room nights. */ - @SerializedName("room_nights") - Long roomNights; + public static Builder builder() { + return new Builder(); + } - /** The total tax amount associating with the room reservation. */ - @SerializedName("total_room_tax_amount") - Long totalRoomTaxAmount; + public static class Builder { + private Long amount; - /** The total tax amount. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; + private Map extraParams; - 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 rate; - private Long adults; + private String type; - private Affiliate affiliate; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - private String bookingNumber; + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - private Category category; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.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; + } - private Long checkinAt; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.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; + } - private Long checkoutAt; + /** Tax rate applied. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } - private String customerServicePhoneNumber; + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } + } - private Long dailyRoomRateAmount; + public enum RateUnit implements ApiRequestParams.EnumParam { + @SerializedName("days") + DAYS("days"), - private Delivery delivery; + @SerializedName("kilometers") + KILOMETERS("kilometers"), - private List extraCharges; + @SerializedName("miles") + MILES("miles"), - private Map extraParams; + @SerializedName("months") + MONTHS("months"), - private Boolean fireSafetyActCompliance; + @SerializedName("weeks") + WEEKS("weeks"); - private String name; + @Getter(onMethod_ = {@Override}) + private final String value; - private Boolean noShow; + RateUnit(String value) { + this.value = value; + } + } + } - private Long numberOfRooms; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vehicle { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 List passengers; + /** Make of the rental vehicle. */ + @SerializedName("make") + String make; - private String propertyPhoneNumber; + /** Model of the rental vehicle. */ + @SerializedName("model") + String model; - private String roomClass; + /** Odometer reading at the time of rental. */ + @SerializedName("odometer") + Long odometer; - private Long roomNights; + /** Type of the rental vehicle. */ + @SerializedName("type") + Type type; - private Long totalRoomTaxAmount; + /** Class of the rental vehicle. */ + @SerializedName("vehicle_class") + VehicleClass vehicleClass; - private Long totalTaxAmount; + /** Vehicle identification number (VIN). */ + @SerializedName("vehicle_identification_number") + String vehicleIdentificationNumber; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Lodging build() { - return new PaymentIntentCreateParams.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); + private Vehicle( + Map extraParams, + String make, + String model, + Long odometer, + Type type, + VehicleClass vehicleClass, + String vehicleIdentificationNumber) { + this.extraParams = extraParams; + this.make = make; + this.model = model; + this.odometer = odometer; + this.type = type; + this.vehicleClass = vehicleClass; + this.vehicleIdentificationNumber = vehicleIdentificationNumber; } - /** The lodging location's address. */ - public Builder setAddress( - PaymentIntentCreateParams.PaymentDetails.Lodging.Address address) { - this.address = address; - return this; + public static Builder builder() { + return new Builder(); } - /** The number of adults on the booking. */ - public Builder setAdults(Long adults) { - this.adults = adults; - return this; - } + public static class Builder { + private Map extraParams; - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentCreateParams.PaymentDetails.Lodging.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + private String make; - /** The booking number associated with the lodging reservation. */ - public Builder setBookingNumber(String bookingNumber) { - this.bookingNumber = bookingNumber; - return this; - } + private String model; - /** The lodging category. */ - public Builder setCategory( - PaymentIntentCreateParams.PaymentDetails.Lodging.Category category) { - this.category = category; - return this; - } + private Long odometer; - /** - * Required. Lodging check-in time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckinAt(Long checkinAt) { - this.checkinAt = checkinAt; - return this; - } + private Type type; - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckoutAt(Long checkoutAt) { - this.checkoutAt = checkoutAt; - return this; - } + private VehicleClass vehicleClass; - /** The customer service phone number of the lodging company. */ - public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { - this.customerServicePhoneNumber = customerServicePhoneNumber; - return this; - } + private String vehicleIdentificationNumber; - /** The daily lodging room rate. */ - public Builder setDailyRoomRateAmount(Long dailyRoomRateAmount) { - this.dailyRoomRateAmount = dailyRoomRateAmount; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Vehicle build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Vehicle( + this.extraParams, + this.make, + this.model, + this.odometer, + this.type, + this.vehicleClass, + this.vehicleIdentificationNumber); + } - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentCreateParams.PaymentDetails.Lodging.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 + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Vehicle#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + 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 - * PaymentIntentCreateParams.PaymentDetails.Lodging#extraCharges} for the field - * documentation. - */ - public Builder addExtraCharge( - PaymentIntentCreateParams.PaymentDetails.Lodging.ExtraCharge element) { - if (this.extraCharges == null) { - this.extraCharges = new ArrayList<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Vehicle#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; } - 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 - * PaymentIntentCreateParams.PaymentDetails.Lodging#extraCharges} for the field - * documentation. - */ - public Builder addAllExtraCharge( - List elements) { - if (this.extraCharges == null) { - this.extraCharges = new ArrayList<>(); + /** Make of the rental vehicle. */ + public Builder setMake(String make) { + this.make = make; + return this; } - 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 PaymentIntentCreateParams.PaymentDetails.Lodging#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Model of the rental vehicle. */ + public Builder setModel(String model) { + this.model = model; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Lodging#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Odometer reading at the time of rental. */ + public Builder setOdometer(Long odometer) { + this.odometer = odometer; + return this; } - 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; - } + /** Type of the rental vehicle. */ + public Builder setType( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Vehicle.Type type) { + this.type = type; + return this; + } - /** The name of the lodging location. */ - public Builder setName(String name) { - this.name = name; - return this; - } + /** Class of the rental vehicle. */ + public Builder setVehicleClass( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Vehicle.VehicleClass + vehicleClass) { + this.vehicleClass = vehicleClass; + 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; + /** Vehicle identification number (VIN). */ + public Builder setVehicleIdentificationNumber(String vehicleIdentificationNumber) { + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + return this; + } } - /** The number of rooms on the booking. */ - public Builder setNumberOfRooms(Long numberOfRooms) { - this.numberOfRooms = numberOfRooms; - return this; - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("cargo_van") + CARGO_VAN("cargo_van"), - /** - * 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 - * PaymentIntentCreateParams.PaymentDetails.Lodging#passengers} for the field documentation. - */ - public Builder addPassenger( - PaymentIntentCreateParams.PaymentDetails.Lodging.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.add(element); - return this; - } + @SerializedName("compact") + COMPACT("compact"), - /** - * 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 - * PaymentIntentCreateParams.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; - } + @SerializedName("economy") + ECONOMY("economy"), - /** The phone number of the lodging location. */ - public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { - this.propertyPhoneNumber = propertyPhoneNumber; - return this; - } + @SerializedName("exotic") + EXOTIC("exotic"), - /** The room class for this purchase. */ - public Builder setRoomClass(String roomClass) { - this.roomClass = roomClass; - return this; - } + @SerializedName("exotic_suv") + EXOTIC_SUV("exotic_suv"), - /** The number of room nights. */ - public Builder setRoomNights(Long roomNights) { - this.roomNights = roomNights; - return this; - } + @SerializedName("fifteen_passenger_van") + FIFTEEN_PASSENGER_VAN("fifteen_passenger_van"), - /** The total tax amount associating with the room reservation. */ - public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { - this.totalRoomTaxAmount = totalRoomTaxAmount; - return this; - } + @SerializedName("four_wheel_drive") + FOUR_WHEEL_DRIVE("four_wheel_drive"), - /** The total tax amount. */ - public Builder setTotalTaxAmount(Long totalTaxAmount) { - this.totalTaxAmount = totalTaxAmount; - return this; - } - } + @SerializedName("full_size") + FULL_SIZE("full_size"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + @SerializedName("intermediate") + INTERMEDIATE("intermediate"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + @SerializedName("large_suv") + LARGE_SUV("large_suv"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("large_truck") + LARGE_TRUCK("large_truck"), - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; + @SerializedName("luxury") + LUXURY("luxury"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - String line2; + @SerializedName("medium_suv") + MEDIUM_SUV("medium_suv"), - /** ZIP or postal code. */ - @SerializedName("postal_code") - String postalCode; + @SerializedName("midsize") + MIDSIZE("midsize"), - /** State, county, province, or region. */ - @SerializedName("state") - String state; + @SerializedName("mini") + MINI("mini"), - 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; - } + @SerializedName("minivan") + MINIVAN("minivan"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), - public static class Builder { - private String city; + @SerializedName("moped") + MOPED("moped"), - private String country; + @SerializedName("moving_van") + MOVING_VAN("moving_van"), - private Map extraParams; + @SerializedName("premium") + PREMIUM("premium"), - private String line1; + @SerializedName("regular") + REGULAR("regular"), - private String line2; + @SerializedName("small_medium_truck") + SMALL_MEDIUM_TRUCK("small_medium_truck"), - private String postalCode; + @SerializedName("small_suv") + SMALL_SUV("small_suv"), - private String state; + @SerializedName("special") + SPECIAL("special"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Lodging.Address build() { - return new PaymentIntentCreateParams.PaymentDetails.Lodging.Address( - this.city, - this.country, - this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); - } + @SerializedName("standard") + STANDARD("standard"), - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; - return this; - } + @SerializedName("stretch") + STRETCH("stretch"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; - return this; - } + @SerializedName("subcompact") + SUBCOMPACT("subcompact"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + @SerializedName("taxi") + TAXI("taxi"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + @SerializedName("twelve_foot_truck") + TWELVE_FOOT_TRUCK("twelve_foot_truck"), - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } + @SerializedName("twelve_passenger_van") + TWELVE_PASSENGER_VAN("twelve_passenger_van"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } + @SerializedName("twenty_foot_truck") + TWENTY_FOOT_TRUCK("twenty_foot_truck"), - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + @SerializedName("twenty_four_foot_truck") + TWENTY_FOUR_FOOT_TRUCK("twenty_four_foot_truck"), - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; - } - } - } + @SerializedName("twenty_six_foot_truck") + TWENTY_SIX_FOOT_TRUCK("twenty_six_foot_truck"), - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @SerializedName("unique") + UNIQUE("unique"); - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - String name; + @Getter(onMethod_ = {@Override}) + private final String value; - private Affiliate(Map extraParams, String name) { - this.extraParams = extraParams; - this.name = name; - } - - public static Builder builder() { - return new Builder(); + Type(String value) { + this.value = value; + } } - public static class Builder { - private Map extraParams; + public enum VehicleClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - private String name; + @SerializedName("economy") + ECONOMY("economy"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Lodging.Affiliate build() { - return new PaymentIntentCreateParams.PaymentDetails.Lodging.Affiliate( - this.extraParams, this.name); - } + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; - return this; + VehicleClass(String value) { + this.value = value; } } } + } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EventDetails { + /** Indicates if the tickets are digitally checked when entering the venue. */ + @SerializedName("access_controlled_venue") + Boolean accessControlledVenue; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** The event location's address. */ + @SerializedName("address") + Address address; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { - this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; - } + /** The name of the company. */ + @SerializedName("company") + String company; - public static Builder builder() { - return new Builder(); - } + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - public static class Builder { - private Map extraParams; + /** Event end time. Measured in seconds since the Unix epoch. */ + @SerializedName("ends_at") + Long endsAt; - private Mode mode; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Recipient recipient; + /** Type of the event entertainment (concert, sports event etc). */ + @SerializedName("genre") + String genre; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery build() { - return new PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery( - this.extraParams, this.mode, this.recipient); - } + /** Required. The name of the event. */ + @SerializedName("name") + String 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 PaymentIntentCreateParams.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; - } + /** Event start time. Measured in seconds since the Unix epoch. */ + @SerializedName("starts_at") + Long startsAt; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } + 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; + } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Mode mode) { - this.mode = mode; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { - this.recipient = recipient; - return this; - } - } + public static class Builder { + private Boolean accessControlledVenue; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - String email; + private Address address; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Affiliate affiliate; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - String name; + private String company; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - String phone; + private Delivery delivery; - private Recipient( - String email, Map extraParams, String name, String phone) { - this.email = email; - this.extraParams = extraParams; - this.name = name; - this.phone = phone; - } + private Long endsAt; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private String email; + private String genre; - private Map extraParams; + private String name; - private String name; + private Long startsAt; - private String phone; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.EventDetails build() { + return new PaymentIntentCreateParams.PaymentDetails.EventDetails( + this.accessControlledVenue, + this.address, + this.affiliate, + this.company, + this.delivery, + this.endsAt, + this.extraParams, + this.genre, + this.name, + this.startsAt); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient build() { - return new PaymentIntentCreateParams.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; - } + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentCreateParams.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; - } + /** The event location's address. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Address address) { + this.address = address; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentCreateParams.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; - } + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; - return this; - } + /** The name of the company. */ + public Builder setCompany(String company) { + this.company = company; + return this; + } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } - } + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery delivery) { + this.delivery = delivery; + return this; } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + /** Event end time. Measured in seconds since the Unix epoch. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } - @SerializedName("phone") - PHONE("phone"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - @SerializedName("pickup") - PICKUP("pickup"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - @SerializedName("post") - POST("post"); + /** Type of the event entertainment (concert, sports event etc). */ + public Builder setGenre(String genre) { + this.genre = genre; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Required. The name of the event. */ + public Builder setName(String name) { + this.name = name; + return this; + } - Mode(String value) { - this.value = value; - } + /** Event start time. Measured in seconds since the Unix epoch. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Passenger { + 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. @@ -7106,15 +7524,37 @@ public static class Passenger { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. Full name of the person or entity on the lodging reservation. - */ - @SerializedName("name") - String name; + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; - private Passenger(Map extraParams, String name) { + /** Address line 2, such as the 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.name = name; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } public static Builder builder() { @@ -7122,21 +7562,53 @@ public static Builder builder() { } public static class Builder { + private String city; + + private String country; + private Map extraParams; - private String name; + private String line1; + + private String line2; + + private String postalCode; + + private String state; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Lodging.Passenger build() { - return new PaymentIntentCreateParams.PaymentDetails.Lodging.Passenger( - this.extraParams, this.name); + public PaymentIntentCreateParams.PaymentDetails.EventDetails.Address build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentDetails.Lodging.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.EventDetails.Address#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -7149,8 +7621,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Lodging.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.EventDetails.Address#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -7160,214 +7633,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Full name of the person or entity on the lodging - * reservation. - */ - public Builder setName(String name) { - this.name = name; + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - } - } - - public enum Category implements ApiRequestParams.EnumParam { - @SerializedName("hotel") - HOTEL("hotel"), - @SerializedName("vacation_rental") - VACATION_RENTAL("vacation_rental"); + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - @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 - @EqualsAndHashCode(callSuper = false) - 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 PaymentIntentCreateParams.PaymentDetails.Subscription build() { - return new PaymentIntentCreateParams.PaymentDetails.Subscription( - this.affiliate, - this.autoRenewal, - this.billingInterval, - this.endsAt, - this.extraParams, - this.name, - this.startsAt); - } - - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentCreateParams.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( - PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentDetails.Subscription#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentDetails.Subscription#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; } - 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; } } @@ -7403,8 +7691,8 @@ public static class Builder { private String name; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate build() { - return new PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate( + public PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate build() { + return new PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate( this.extraParams, this.name); } @@ -7412,7 +7700,7 @@ public PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate build() { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate#extraParams} for the + * PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -7427,7 +7715,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate#extraParams} for the + * PaymentIntentCreateParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -7448,14 +7736,7 @@ public Builder setName(String name) { @Getter @EqualsAndHashCode(callSuper = false) - 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; - + 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. @@ -7466,17 +7747,18 @@ public static class BillingInterval { @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; + /** The delivery method for the payment. */ + @SerializedName("mode") + Mode mode; - private BillingInterval(Long count, Map extraParams, Interval interval) { - this.count = count; + /** Details of the recipient. */ + @SerializedName("recipient") + Recipient recipient; + + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; - this.interval = interval; + this.mode = mode; + this.recipient = recipient; } public static Builder builder() { @@ -7484,33 +7766,24 @@ public static Builder builder() { } public static class Builder { - private Long count; - private Map extraParams; - private Interval interval; + private Mode mode; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval build() { - return new PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval( - this.count, this.extraParams, this.interval); - } + private Recipient recipient; - /** - * 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; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery build() { + return new PaymentIntentCreateParams.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 - * PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval#extraParams} for - * the field documentation. + * PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -7524,8 +7797,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval#extraParams} for - * the field documentation. + * PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -7535,2380 +7808,1800 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Specifies a type of interval unit. Either {@code day}, - * {@code week}, {@code month} or {@code year}. - */ - public Builder setInterval( - PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval.Interval - interval) { - this.interval = interval; + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @SerializedName("email") + String email; - @SerializedName("month") - MONTH("month"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("week") - WEEK("week"), + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + String name; - @SerializedName("year") - YEAR("year"); + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + String phone; - @Getter(onMethod_ = {@Override}) - private final String value; + private Recipient( + String email, Map extraParams, String name, String phone) { + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } - Interval(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static class Builder { + private String email; - /** - * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm - * payment method. - */ - @SerializedName("affirm") - Affirm affirm; + private Map extraParams; - /** - * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the - * AfterpayClearpay payment method. - */ - @SerializedName("afterpay_clearpay") - AfterpayClearpay afterpayClearpay; + private String name; - /** - * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay - * payment method. - */ - @SerializedName("alipay") - Alipay alipay; + private String phone; - /** - * 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; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient + build() { + return new PaymentIntentCreateParams.PaymentDetails.EventDetails.Delivery.Recipient( + this.email, this.extraParams, this.name, this.phone); + } - /** - * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - */ - @SerializedName("alma") - Alma alma; + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } - /** - * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment - * method. - */ - @SerializedName("amazon_pay") - AmazonPay amazonPay; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.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; + } - /** - * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank - * account. - */ - @SerializedName("au_becs_debit") - AuBecsDebit auBecsDebit; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.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; + } - /** - * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs - * Direct Debit bank account. - */ - @SerializedName("bacs_debit") - BacsDebit bacsDebit; + /** The name of the recipient the ticket is delivered to. */ + public Builder setName(String name) { + this.name = name; + return this; + } - /** - * If this is a {@code bancontact} PaymentMethod, this hash contains details about the - * Bancontact payment method. - */ - @SerializedName("bancontact") - Bancontact bancontact; + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } - /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * payment method. - */ - @SerializedName("billie") - Billie billie; + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("email") + EMAIL("email"), - /** - * Billing information associated with the PaymentMethod that may be used or required by - * particular types of payment methods. - */ - @SerializedName("billing_details") - BillingDetails billingDetails; + @SerializedName("phone") + PHONE("phone"), - /** - * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment - * method. - */ - @SerializedName("blik") - Blik blik; + @SerializedName("pickup") + PICKUP("pickup"), - /** - * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto - * payment method. - */ - @SerializedName("boleto") - Boleto boleto; + @SerializedName("post") + POST("post"); - /** - * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay - * payment method. - */ - @SerializedName("cashapp") - Cashapp cashapp; + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment - * method. - */ - @SerializedName("crypto") - Crypto crypto; + Mode(String value) { + this.value = value; + } + } + } + } - /** - * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the - * CustomerBalance payment method. - */ - @SerializedName("customer_balance") - CustomerBalance customerBalance; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flight { + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - /** - * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment - * method. - */ - @SerializedName("eps") - Eps eps; + /** + * 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; - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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 International Air Transport Association (IATA) carrier code of the carrier that issued + * the ticket. + */ + @SerializedName("carrier") + String carrier; - /** - * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment - * method. - */ - @SerializedName("fpx") - Fpx fpx; + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - /** - * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay - * payment method. - */ - @SerializedName("giropay") - Giropay giropay; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - */ - @SerializedName("gopay") - Gopay gopay; + /** The name of the person or entity on the reservation. */ + @SerializedName("passenger_name") + String passengerName; - /** - * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay - * payment method. - */ - @SerializedName("grabpay") - Grabpay grabpay; + /** The details of the passengers in the travel reservation. */ + @SerializedName("passengers") + List passengers; - /** - * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the - * IdBankTransfer payment method. - */ - @SerializedName("id_bank_transfer") - IdBankTransfer idBankTransfer; + /** Required. The individual flight segments associated with the trip. */ + @SerializedName("segments") + List segments; - /** - * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment - * method. - */ - @SerializedName("ideal") - Ideal ideal; + /** The ticket number associated with the travel reservation. */ + @SerializedName("ticket_number") + String ticketNumber; - /** - * If this is an {@code interac_present} PaymentMethod, this hash contains details about the - * Interac Present payment method. - */ - @SerializedName("interac_present") - InteracPresent interacPresent; + 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; + } - /** - * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao Pay - * payment method. - */ - @SerializedName("kakao_pay") - KakaoPay kakaoPay; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna - * payment method. - */ - @SerializedName("klarna") - Klarna klarna; + public static class Builder { + private Affiliate affiliate; - /** - * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini - * payment method. - */ - @SerializedName("konbini") - Konbini konbini; + private String agencyNumber; - /** - * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean Card - * payment method. - */ - @SerializedName("kr_card") - KrCard krCard; + private String carrier; - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - @SerializedName("link") - Link link; + private Delivery delivery; - /** - * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment - * method. - */ - @SerializedName("mb_way") - MbWay mbWay; + private Map extraParams; - /** - * Set of key-value pairs that you can attach - * to an object. This can be useful for storing additional information about the object in a - * structured format. Individual keys can be unset by posting an empty value to them. All keys - * can be unset by posting an empty value to {@code metadata}. - */ - @SerializedName("metadata") - Map metadata; + private String passengerName; - /** - * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the MobilePay - * payment method. - */ - @SerializedName("mobilepay") - Mobilepay mobilepay; + private List passengers; - /** - * If this is a {@code multibanco} PaymentMethod, this hash contains details about the - * Multibanco payment method. - */ - @SerializedName("multibanco") - Multibanco multibanco; + private List segments; - /** - * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver Pay - * payment method. - */ - @SerializedName("naver_pay") - NaverPay naverPay; + private String ticketNumber; - /** - * If this is an nz_bank_account PaymentMethod, this hash contains details about the - * nz_bank_account payment method. - */ - @SerializedName("nz_bank_account") - NzBankAccount nzBankAccount; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Flight build() { + return new PaymentIntentCreateParams.PaymentDetails.Flight( + this.affiliate, + this.agencyNumber, + this.carrier, + this.delivery, + this.extraParams, + this.passengerName, + this.passengers, + this.segments, + this.ticketNumber); + } - /** - * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment - * method. - */ - @SerializedName("oxxo") - Oxxo oxxo; + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** - * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment - * method. - */ - @SerializedName("p24") - P24 p24; + /** + * 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; + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. - */ - @SerializedName("pay_by_bank") - PayByBank payByBank; + /** + * 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; + } - /** - * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment - * method. - */ - @SerializedName("payco") - Payco payco; + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentCreateParams.PaymentDetails.Flight.Delivery delivery) { + this.delivery = delivery; + return this; + } - /** - * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow - * payment method. - */ - @SerializedName("paynow") - Paynow paynow; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - /** - * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal - * payment method. - */ - @SerializedName("paypal") - Paypal paypal; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - /** - * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay - * payment method. - */ - @SerializedName("paypay") - Paypay paypay; + /** The name of the person or entity on the reservation. */ + public Builder setPassengerName(String passengerName) { + this.passengerName = passengerName; + return this; + } - /** - * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment - * method. - */ - @SerializedName("payto") - Payto payto; + /** + * 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 + * PaymentIntentCreateParams.PaymentDetails.Flight#passengers} for the field documentation. + */ + public Builder addPassenger( + PaymentIntentCreateParams.PaymentDetails.Flight.Passenger element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - /** - * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment - * method. - */ - @SerializedName("pix") - Pix pix; + /** + * 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 + * PaymentIntentCreateParams.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; + } - /** - * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay - * payment method. - */ - @SerializedName("promptpay") - Promptpay promptpay; + /** + * 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 + * PaymentIntentCreateParams.PaymentDetails.Flight#segments} for the field documentation. + */ + public Builder addSegment(PaymentIntentCreateParams.PaymentDetails.Flight.Segment element) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.add(element); + return this; + } - /** - * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment - * method. - */ - @SerializedName("qris") - Qris qris; + /** + * 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 + * PaymentIntentCreateParams.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; + } - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - @SerializedName("radar_options") - RadarOptions radarOptions; + /** The ticket number associated with the travel reservation. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + } - /** - * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung - * payment method. - */ - @SerializedName("rechnung") - Rechnung rechnung; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the Revolut - * Pay payment method. - */ - @SerializedName("revolut_pay") - RevolutPay revolutPay; + /** Required. The name of the affiliate that originated the purchase. */ + @SerializedName("name") + String name; - /** - * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the - * SamsungPay payment method. - */ - @SerializedName("samsung_pay") - SamsungPay samsungPay; + private Affiliate(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - /** - * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay - * payment method. - */ - @SerializedName("satispay") - Satispay satispay; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA - * debit bank account. - */ - @SerializedName("sepa_debit") - SepaDebit sepaDebit; + public static class Builder { + private Map extraParams; - /** - * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment - * method. - */ - @SerializedName("shopeepay") - Shopeepay shopeepay; + private String name; - /** - * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT - * payment method. - */ - @SerializedName("sofort") - Sofort sofort; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate build() { + return new PaymentIntentCreateParams.PaymentDetails.Flight.Affiliate( + this.extraParams, this.name); + } - /** This hash contains details about the Stripe balance payment method. */ - @SerializedName("stripe_balance") - StripeBalance stripeBalance; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - /** - * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment - * method. - */ - @SerializedName("swish") - Swish swish; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - /** - * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - */ - @SerializedName("twint") - Twint twint; + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + 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. - */ - @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; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the - * wechat_pay payment method. - */ - @SerializedName("wechat_pay") - WechatPay wechatPay; + /** The delivery method for the payment. */ + @SerializedName("mode") + Mode mode; - /** - * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment - * method. - */ - @SerializedName("zip") - Zip zip; + /** Details of the recipient. */ + @SerializedName("recipient") + Recipient recipient; - private PaymentMethodData( - AcssDebit acssDebit, - Affirm affirm, - AfterpayClearpay afterpayClearpay, - Alipay alipay, - AllowRedisplay allowRedisplay, - Alma alma, - AmazonPay amazonPay, - AuBecsDebit auBecsDebit, - BacsDebit bacsDebit, - Bancontact bancontact, - Billie billie, - BillingDetails billingDetails, - Blik blik, - Boleto boleto, - Cashapp cashapp, - Crypto crypto, - CustomerBalance customerBalance, - Eps eps, - Map extraParams, - Fpx fpx, - Giropay giropay, - Gopay gopay, - Grabpay grabpay, - IdBankTransfer idBankTransfer, - Ideal ideal, - InteracPresent interacPresent, - KakaoPay kakaoPay, - Klarna klarna, - Konbini konbini, - KrCard krCard, - Link link, - MbWay mbWay, - Map metadata, - Mobilepay mobilepay, - Multibanco multibanco, - NaverPay naverPay, - NzBankAccount nzBankAccount, - Oxxo oxxo, - P24 p24, - PayByBank payByBank, - Payco payco, - Paynow paynow, - Paypal paypal, - Paypay paypay, - Payto payto, - Pix pix, - Promptpay promptpay, - Qris qris, - RadarOptions radarOptions, - Rechnung rechnung, - RevolutPay revolutPay, - SamsungPay samsungPay, - Satispay satispay, - SepaDebit sepaDebit, - Shopeepay shopeepay, - Sofort sofort, - StripeBalance stripeBalance, - 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.alma = alma; - this.amazonPay = amazonPay; - this.auBecsDebit = auBecsDebit; - this.bacsDebit = bacsDebit; - this.bancontact = bancontact; - this.billie = billie; - this.billingDetails = billingDetails; - this.blik = blik; - this.boleto = boleto; - this.cashapp = cashapp; - this.crypto = crypto; - this.customerBalance = customerBalance; - this.eps = eps; - this.extraParams = extraParams; - this.fpx = fpx; - this.giropay = giropay; - this.gopay = gopay; - this.grabpay = grabpay; - this.idBankTransfer = idBankTransfer; - this.ideal = ideal; - this.interacPresent = interacPresent; - this.kakaoPay = kakaoPay; - this.klarna = klarna; - this.konbini = konbini; - this.krCard = krCard; - this.link = link; - this.mbWay = mbWay; - this.metadata = metadata; - this.mobilepay = mobilepay; - this.multibanco = multibanco; - this.naverPay = naverPay; - this.nzBankAccount = nzBankAccount; - this.oxxo = oxxo; - this.p24 = p24; - this.payByBank = payByBank; - this.payco = payco; - this.paynow = paynow; - this.paypal = paypal; - this.paypay = paypay; - this.payto = payto; - this.pix = pix; - this.promptpay = promptpay; - this.qris = qris; - this.radarOptions = radarOptions; - this.rechnung = rechnung; - this.revolutPay = revolutPay; - this.samsungPay = samsungPay; - this.satispay = satispay; - this.sepaDebit = sepaDebit; - this.shopeepay = shopeepay; - this.sofort = sofort; - this.stripeBalance = stripeBalance; - this.swish = swish; - this.twint = twint; - this.type = type; - this.usBankAccount = usBankAccount; - this.wechatPay = wechatPay; - this.zip = zip; - } + 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 Builder builder() { + return new Builder(); + } - public static class Builder { - private AcssDebit acssDebit; + public static class Builder { + private Map extraParams; - private Affirm affirm; + private Mode mode; - private AfterpayClearpay afterpayClearpay; + private Recipient recipient; - private Alipay alipay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Flight.Delivery build() { + return new PaymentIntentCreateParams.PaymentDetails.Flight.Delivery( + this.extraParams, this.mode, this.recipient); + } - private AllowRedisplay allowRedisplay; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - private Alma alma; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - private AmazonPay amazonPay; + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Mode mode) { + this.mode = mode; + return this; + } - private AuBecsDebit auBecsDebit; + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } - private BacsDebit bacsDebit; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @SerializedName("email") + String email; - private Bancontact 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 Billie billie; - - private BillingDetails billingDetails; - - private Blik blik; - - private Boleto boleto; - - private Cashapp cashapp; - - private Crypto crypto; - - private CustomerBalance customerBalance; - - private Eps eps; - - private Map extraParams; + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + String name; - private Fpx fpx; + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + String phone; - private Giropay giropay; + private Recipient( + String email, Map extraParams, String name, String phone) { + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } - private Gopay gopay; + public static Builder builder() { + return new Builder(); + } - private Grabpay grabpay; + public static class Builder { + private String email; - private IdBankTransfer idBankTransfer; + private Map extraParams; - private Ideal ideal; + private String name; - private InteracPresent interacPresent; + private String phone; - private KakaoPay kakaoPay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new PaymentIntentCreateParams.PaymentDetails.Flight.Delivery.Recipient( + this.email, this.extraParams, this.name, this.phone); + } - private Klarna klarna; + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } - private Konbini konbini; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.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; + } - private KrCard krCard; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.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; + } - private Link link; + /** The name of the recipient the ticket is delivered to. */ + public Builder setName(String name) { + this.name = name; + return this; + } - private MbWay mbWay; + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } - private Map metadata; + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("email") + EMAIL("email"), - private Mobilepay mobilepay; + @SerializedName("phone") + PHONE("phone"), - private Multibanco multibanco; + @SerializedName("pickup") + PICKUP("pickup"), - private NaverPay naverPay; + @SerializedName("post") + POST("post"); - private NzBankAccount nzBankAccount; + @Getter(onMethod_ = {@Override}) + private final String value; - private Oxxo oxxo; + Mode(String value) { + this.value = value; + } + } + } - private P24 p24; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - private PayByBank payByBank; + /** + * Required. Full name of the person or entity on the flight reservation. + */ + @SerializedName("name") + String name; - private Payco payco; + private Passenger(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - private Paynow paynow; + public static Builder builder() { + return new Builder(); + } - private Paypal paypal; + public static class Builder { + private Map extraParams; - private Paypay paypay; + private String name; - private Payto payto; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Flight.Passenger build() { + return new PaymentIntentCreateParams.PaymentDetails.Flight.Passenger( + this.extraParams, this.name); + } - private Pix pix; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - private Promptpay promptpay; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - private Qris qris; + /** + * Required. Full name of the person or entity on the flight reservation. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + } + } - private RadarOptions radarOptions; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Segment { + /** The flight segment amount. */ + @SerializedName("amount") + Long amount; - private Rechnung rechnung; + /** + * The International Air Transport Association (IATA) airport code for the arrival airport. + */ + @SerializedName("arrival_airport") + String arrivalAirport; - private RevolutPay revolutPay; + /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ + @SerializedName("arrives_at") + Long arrivesAt; - private SamsungPay samsungPay; + /** + * The International Air Transport Association (IATA) carrier code of the carrier operating + * the flight segment. + */ + @SerializedName("carrier") + String carrier; - private Satispay satispay; + /** + * Required. The departure time for the flight segment. Measured in seconds + * since the Unix epoch. + */ + @SerializedName("departs_at") + Long departsAt; - private SepaDebit sepaDebit; + /** + * The International Air Transport Association (IATA) airport code for the departure + * airport. + */ + @SerializedName("departure_airport") + String departureAirport; - private Shopeepay shopeepay; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Sofort sofort; + /** The flight number associated with the segment. */ + @SerializedName("flight_number") + String flightNumber; - private StripeBalance stripeBalance; + /** The fare class for the segment. */ + @SerializedName("service_class") + ServiceClass serviceClass; - private Swish swish; + 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; + } - private Twint twint; + public static Builder builder() { + return new Builder(); + } - private Type type; + public static class Builder { + private Long amount; - private UsBankAccount usBankAccount; + private String arrivalAirport; - private WechatPay wechatPay; + private Long arrivesAt; - private Zip zip; + private String carrier; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData build() { - return new PaymentIntentCreateParams.PaymentMethodData( - this.acssDebit, - this.affirm, - this.afterpayClearpay, - this.alipay, - this.allowRedisplay, - this.alma, - this.amazonPay, - this.auBecsDebit, - this.bacsDebit, - this.bancontact, - this.billie, - this.billingDetails, - this.blik, - this.boleto, - this.cashapp, - this.crypto, - this.customerBalance, - this.eps, - this.extraParams, - this.fpx, - this.giropay, - this.gopay, - this.grabpay, - this.idBankTransfer, - this.ideal, - this.interacPresent, - this.kakaoPay, - this.klarna, - this.konbini, - this.krCard, - this.link, - this.mbWay, - this.metadata, - this.mobilepay, - this.multibanco, - this.naverPay, - this.nzBankAccount, - this.oxxo, - this.p24, - this.payByBank, - this.payco, - this.paynow, - this.paypal, - this.paypay, - this.payto, - this.pix, - this.promptpay, - this.qris, - this.radarOptions, - this.rechnung, - this.revolutPay, - this.samsungPay, - this.satispay, - this.sepaDebit, - this.shopeepay, - this.sofort, - this.stripeBalance, - this.swish, - this.twint, - this.type, - this.usBankAccount, - this.wechatPay, - this.zip); - } + private Long departsAt; - /** - * If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS - * Debit payment method. - */ - public Builder setAcssDebit(PaymentIntentCreateParams.PaymentMethodData.AcssDebit acssDebit) { - this.acssDebit = acssDebit; - return this; - } + private String departureAirport; - /** - * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm - * payment method. - */ - public Builder setAffirm(PaymentIntentCreateParams.PaymentMethodData.Affirm affirm) { - this.affirm = affirm; - return this; - } + private Map extraParams; - /** - * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the - * AfterpayClearpay payment method. - */ - public Builder setAfterpayClearpay( - PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; - return this; - } + private String flightNumber; - /** - * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay - * payment method. - */ - public Builder setAlipay(PaymentIntentCreateParams.PaymentMethodData.Alipay alipay) { - this.alipay = alipay; - return this; - } + private ServiceClass serviceClass; - /** - * 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( - PaymentIntentCreateParams.PaymentMethodData.AllowRedisplay allowRedisplay) { - this.allowRedisplay = allowRedisplay; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Flight.Segment build() { + return new PaymentIntentCreateParams.PaymentDetails.Flight.Segment( + this.amount, + this.arrivalAirport, + this.arrivesAt, + this.carrier, + this.departsAt, + this.departureAirport, + this.extraParams, + this.flightNumber, + this.serviceClass); + } - /** - * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - */ - public Builder setAlma(PaymentIntentCreateParams.PaymentMethodData.Alma alma) { - this.alma = alma; - return this; - } + /** The flight segment amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** - * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay - * payment method. - */ - public Builder setAmazonPay(PaymentIntentCreateParams.PaymentMethodData.AmazonPay amazonPay) { - this.amazonPay = amazonPay; - return this; - } + /** + * The International Air Transport Association (IATA) airport code for the arrival + * airport. + */ + public Builder setArrivalAirport(String arrivalAirport) { + this.arrivalAirport = arrivalAirport; + return this; + } - /** - * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the - * bank account. - */ - public Builder setAuBecsDebit( - PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit auBecsDebit) { - this.auBecsDebit = auBecsDebit; - 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; + } - /** - * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs - * Direct Debit bank account. - */ - public Builder setBacsDebit(PaymentIntentCreateParams.PaymentMethodData.BacsDebit bacsDebit) { - this.bacsDebit = bacsDebit; - 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; + } - /** - * If this is a {@code bancontact} PaymentMethod, this hash contains details about the - * Bancontact payment method. - */ - public Builder setBancontact( - PaymentIntentCreateParams.PaymentMethodData.Bancontact bancontact) { - this.bancontact = bancontact; - 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; + } - /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * payment method. - */ - public Builder setBillie(PaymentIntentCreateParams.PaymentMethodData.Billie billie) { - this.billie = billie; - return this; - } + /** + * The International Air Transport Association (IATA) airport code for the departure + * airport. + */ + public Builder setDepartureAirport(String departureAirport) { + this.departureAirport = departureAirport; + return this; + } - /** - * Billing information associated with the PaymentMethod that may be used or required by - * particular types of payment methods. - */ - public Builder setBillingDetails( - PaymentIntentCreateParams.PaymentMethodData.BillingDetails billingDetails) { - this.billingDetails = billingDetails; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - /** - * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment - * method. - */ - public Builder setBlik(PaymentIntentCreateParams.PaymentMethodData.Blik blik) { - this.blik = blik; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - /** - * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto - * payment method. - */ - public Builder setBoleto(PaymentIntentCreateParams.PaymentMethodData.Boleto boleto) { - this.boleto = boleto; - return this; - } + /** The flight number associated with the segment. */ + public Builder setFlightNumber(String flightNumber) { + this.flightNumber = flightNumber; + return this; + } - /** - * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App - * Pay payment method. - */ - public Builder setCashapp(PaymentIntentCreateParams.PaymentMethodData.Cashapp cashapp) { - this.cashapp = cashapp; - return this; - } + /** The fare class for the segment. */ + public Builder setServiceClass( + PaymentIntentCreateParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { + this.serviceClass = serviceClass; + return this; + } + } - /** - * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment - * method. - */ - public Builder setCrypto(PaymentIntentCreateParams.PaymentMethodData.Crypto crypto) { - this.crypto = crypto; - return this; - } + public enum ServiceClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the - * CustomerBalance payment method. - */ - public Builder setCustomerBalance( - PaymentIntentCreateParams.PaymentMethodData.CustomerBalance customerBalance) { - this.customerBalance = customerBalance; - return this; - } + @SerializedName("economy") + ECONOMY("economy"), - /** - * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment - * method. - */ - public Builder setEps(PaymentIntentCreateParams.PaymentMethodData.Eps eps) { - this.eps = eps; - return this; - } + @SerializedName("first") + FIRST("first"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentIntentCreateParams.PaymentMethodData#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentIntentCreateParams.PaymentMethodData#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceClass(String value) { + this.value = value; + } } - 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(PaymentIntentCreateParams.PaymentMethodData.Fpx fpx) { - this.fpx = fpx; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FlightData { + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; - /** - * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay - * payment method. - */ - public Builder setGiropay(PaymentIntentCreateParams.PaymentMethodData.Giropay giropay) { - this.giropay = giropay; - return this; - } + /** Reservation reference. */ + @SerializedName("booking_number") + String bookingNumber; - /** - * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment - * method. - */ - public Builder setGopay(PaymentIntentCreateParams.PaymentMethodData.Gopay gopay) { - this.gopay = gopay; - return this; - } + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + @SerializedName("computerized_reservation_system") + String computerizedReservationSystem; - /** - * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay - * payment method. - */ - public Builder setGrabpay(PaymentIntentCreateParams.PaymentMethodData.Grabpay grabpay) { - this.grabpay = grabpay; - return this; - } + /** Ticket restrictions. */ + @SerializedName("endorsements_and_restrictions") + String endorsementsAndRestrictions; /** - * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the - * IdBankTransfer payment method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setIdBankTransfer( - PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { - this.idBankTransfer = idBankTransfer; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL - * payment method. - */ - public Builder setIdeal(PaymentIntentCreateParams.PaymentMethodData.Ideal ideal) { - this.ideal = ideal; - return this; - } + /** List of insurances. */ + @SerializedName("insurances") + List insurances; - /** - * If this is an {@code interac_present} PaymentMethod, this hash contains details about the - * Interac Present payment method. - */ - public Builder setInteracPresent( - PaymentIntentCreateParams.PaymentMethodData.InteracPresent interacPresent) { - this.interacPresent = interacPresent; - return this; - } + /** List of passengers. */ + @SerializedName("passengers") + List passengers; - /** - * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao - * Pay payment method. - */ - public Builder setKakaoPay(PaymentIntentCreateParams.PaymentMethodData.KakaoPay kakaoPay) { - this.kakaoPay = kakaoPay; - return this; - } + /** Required. List of flight segments. */ + @SerializedName("segments") + List segments; - /** - * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna - * payment method. - */ - public Builder setKlarna(PaymentIntentCreateParams.PaymentMethodData.Klarna klarna) { - this.klarna = klarna; - return this; - } + /** Electronic ticket indicator. */ + @SerializedName("ticket_electronically_issued_indicator") + Boolean ticketElectronicallyIssuedIndicator; - /** - * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini - * payment method. - */ - public Builder setKonbini(PaymentIntentCreateParams.PaymentMethodData.Konbini konbini) { - this.konbini = konbini; - return this; - } + /** Required. Total cost breakdown. */ + @SerializedName("total") + Total total; - /** - * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean - * Card payment method. - */ - public Builder setKrCard(PaymentIntentCreateParams.PaymentMethodData.KrCard krCard) { - this.krCard = krCard; - return this; + /** Type of flight transaction. */ + @SerializedName("transaction_type") + TransactionType transactionType; + + private FlightData( + Affiliate affiliate, + String bookingNumber, + String computerizedReservationSystem, + String endorsementsAndRestrictions, + Map extraParams, + List insurances, + List passengers, + List segments, + Boolean ticketElectronicallyIssuedIndicator, + Total total, + TransactionType transactionType) { + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.computerizedReservationSystem = computerizedReservationSystem; + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.segments = segments; + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + this.total = total; + this.transactionType = transactionType; } - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - public Builder setLink(PaymentIntentCreateParams.PaymentMethodData.Link link) { - this.link = link; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment - * method. - */ - public Builder setMbWay(PaymentIntentCreateParams.PaymentMethodData.MbWay mbWay) { - this.mbWay = mbWay; - return this; - } + public static class Builder { + private Affiliate affiliate; - /** - * 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 - * PaymentIntentCreateParams.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; - } + private String bookingNumber; - /** - * 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 PaymentIntentCreateParams.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; - } + private String computerizedReservationSystem; - /** - * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the - * MobilePay payment method. - */ - public Builder setMobilepay(PaymentIntentCreateParams.PaymentMethodData.Mobilepay mobilepay) { - this.mobilepay = mobilepay; - return this; - } + private String endorsementsAndRestrictions; - /** - * If this is a {@code multibanco} PaymentMethod, this hash contains details about the - * Multibanco payment method. - */ - public Builder setMultibanco( - PaymentIntentCreateParams.PaymentMethodData.Multibanco multibanco) { - this.multibanco = multibanco; - return this; - } + private Map extraParams; - /** - * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver - * Pay payment method. - */ - public Builder setNaverPay(PaymentIntentCreateParams.PaymentMethodData.NaverPay naverPay) { - this.naverPay = naverPay; - return this; - } + private List insurances; - /** - * If this is an nz_bank_account PaymentMethod, this hash contains details about the - * nz_bank_account payment method. - */ - public Builder setNzBankAccount( - PaymentIntentCreateParams.PaymentMethodData.NzBankAccount nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; - } + private List passengers; - /** - * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment - * method. - */ - public Builder setOxxo(PaymentIntentCreateParams.PaymentMethodData.Oxxo oxxo) { - this.oxxo = oxxo; - return this; - } + private List segments; - /** - * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment - * method. - */ - public Builder setP24(PaymentIntentCreateParams.PaymentMethodData.P24 p24) { - this.p24 = p24; - return this; - } + private Boolean ticketElectronicallyIssuedIndicator; - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. - */ - public Builder setPayByBank(PaymentIntentCreateParams.PaymentMethodData.PayByBank payByBank) { - this.payByBank = payByBank; - return this; - } + private Total total; - /** - * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO - * payment method. - */ - public Builder setPayco(PaymentIntentCreateParams.PaymentMethodData.Payco payco) { - this.payco = payco; - return this; - } + private TransactionType transactionType; - /** - * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow - * payment method. - */ - public Builder setPaynow(PaymentIntentCreateParams.PaymentMethodData.Paynow paynow) { - this.paynow = paynow; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData( + this.affiliate, + this.bookingNumber, + this.computerizedReservationSystem, + this.endorsementsAndRestrictions, + this.extraParams, + this.insurances, + this.passengers, + this.segments, + this.ticketElectronicallyIssuedIndicator, + this.total, + this.transactionType); + } - /** - * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal - * payment method. - */ - public Builder setPaypal(PaymentIntentCreateParams.PaymentMethodData.Paypal paypal) { - this.paypal = paypal; - return this; - } + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentCreateParams.PaymentDetails.FlightData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** - * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay - * payment method. - */ - public Builder setPaypay(PaymentIntentCreateParams.PaymentMethodData.Paypay paypay) { - this.paypay = paypay; - return this; - } + /** Reservation reference. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } - /** - * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo - * payment method. - */ - public Builder setPayto(PaymentIntentCreateParams.PaymentMethodData.Payto payto) { - this.payto = payto; - return this; - } + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + public Builder setComputerizedReservationSystem(String computerizedReservationSystem) { + this.computerizedReservationSystem = computerizedReservationSystem; + return this; + } - /** - * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment - * method. - */ - public Builder setPix(PaymentIntentCreateParams.PaymentMethodData.Pix pix) { - this.pix = pix; - return this; - } + /** Ticket restrictions. */ + public Builder setEndorsementsAndRestrictions(String endorsementsAndRestrictions) { + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + return this; + } - /** - * If this is a {@code promptpay} PaymentMethod, this hash contains details about the - * PromptPay payment method. - */ - public Builder setPromptpay(PaymentIntentCreateParams.PaymentMethodData.Promptpay promptpay) { - this.promptpay = promptpay; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FlightData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment - * method. - */ - public Builder setQris(PaymentIntentCreateParams.PaymentMethodData.Qris qris) { - this.qris = qris; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FlightData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - public Builder setRadarOptions( - PaymentIntentCreateParams.PaymentMethodData.RadarOptions radarOptions) { - this.radarOptions = radarOptions; - return this; - } + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentCreateParams.PaymentDetails.FlightData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } - /** - * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung - * payment method. - */ - public Builder setRechnung(PaymentIntentCreateParams.PaymentMethodData.Rechnung rechnung) { - this.rechnung = rechnung; - return this; - } + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } - /** - * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the - * Revolut Pay payment method. - */ - public Builder setRevolutPay( - PaymentIntentCreateParams.PaymentMethodData.RevolutPay revolutPay) { - this.revolutPay = revolutPay; - 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 + * PaymentIntentCreateParams.PaymentDetails.FlightData#passengers} for the field + * documentation. + */ + public Builder addPassenger( + PaymentIntentCreateParams.PaymentDetails.FlightData.Passenger element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - /** - * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the - * SamsungPay payment method. - */ - public Builder setSamsungPay( - PaymentIntentCreateParams.PaymentMethodData.SamsungPay samsungPay) { - this.samsungPay = samsungPay; - return this; - } - - /** - * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay - * payment method. - */ - public Builder setSatispay(PaymentIntentCreateParams.PaymentMethodData.Satispay satispay) { - this.satispay = satispay; - return this; - } - - /** - * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA - * debit bank account. - */ - public Builder setSepaDebit(PaymentIntentCreateParams.PaymentMethodData.SepaDebit sepaDebit) { - this.sepaDebit = sepaDebit; - return this; - } - - /** - * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay - * payment method. - */ - public Builder setShopeepay(PaymentIntentCreateParams.PaymentMethodData.Shopeepay shopeepay) { - this.shopeepay = shopeepay; - return this; - } - - /** - * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT - * payment method. - */ - public Builder setSofort(PaymentIntentCreateParams.PaymentMethodData.Sofort sofort) { - this.sofort = sofort; - return this; - } - - /** This hash contains details about the Stripe balance payment method. */ - public Builder setStripeBalance( - PaymentIntentCreateParams.PaymentMethodData.StripeBalance stripeBalance) { - this.stripeBalance = stripeBalance; - return this; - } - - /** - * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish - * payment method. - */ - public Builder setSwish(PaymentIntentCreateParams.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(PaymentIntentCreateParams.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(PaymentIntentCreateParams.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( - PaymentIntentCreateParams.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(PaymentIntentCreateParams.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(PaymentIntentCreateParams.PaymentMethodData.Zip zip) { - this.zip = zip; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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 PaymentIntentCreateParams.PaymentMethodData.AcssDebit build() { - return new PaymentIntentCreateParams.PaymentMethodData.AcssDebit( - this.accountNumber, this.extraParams, this.institutionNumber, this.transitNumber); - } - - /** Required. Customer's bank account number. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; + /** + * 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 + * PaymentIntentCreateParams.PaymentDetails.FlightData#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 a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.AcssDebit#extraParams} for - * the field documentation. + * 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 + * PaymentIntentCreateParams.PaymentDetails.FlightData#segments} for the field + * documentation. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addSegment( + PaymentIntentCreateParams.PaymentDetails.FlightData.Segment element) { + if (this.segments == null) { + this.segments = new ArrayList<>(); } - this.extraParams.put(key, value); + this.segments.add(element); return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.AcssDebit#extraParams} for - * the field documentation. + * 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 + * PaymentIntentCreateParams.PaymentDetails.FlightData#segments} for the field + * documentation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addAllSegment( + List elements) { + if (this.segments == null) { + this.segments = new ArrayList<>(); } - this.extraParams.putAll(map); + this.segments.addAll(elements); return this; } - /** Required. Institution number of the customer's bank. */ - public Builder setInstitutionNumber(String institutionNumber) { - this.institutionNumber = institutionNumber; + /** Electronic ticket indicator. */ + public Builder setTicketElectronicallyIssuedIndicator( + Boolean ticketElectronicallyIssuedIndicator) { + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; return this; } - /** Required. Transit number of the customer's bank. */ - public Builder setTransitNumber(String transitNumber) { - this.transitNumber = transitNumber; + /** Required. Total cost breakdown. */ + public Builder setTotal(PaymentIntentCreateParams.PaymentDetails.FlightData.Total total) { + this.total = total; + return this; + } + + /** Type of flight transaction. */ + public Builder setTransactionType( + PaymentIntentCreateParams.PaymentDetails.FlightData.TransactionType transactionType) { + this.transactionType = transactionType; return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; - private Affirm(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** Name of affiliate partner. */ + @SerializedName("name") + String name; - public static class Builder { - private Map extraParams; + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + @SerializedName("travel_authorization_code") + String travelAuthorizationCode; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Affirm build() { - return new PaymentIntentCreateParams.PaymentMethodData.Affirm(this.extraParams); + private Affiliate( + String code, + Map extraParams, + String name, + String travelAuthorizationCode) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + this.travelAuthorizationCode = travelAuthorizationCode; } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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 PaymentIntentCreateParams.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; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static class Builder { + private String code; - private AfterpayClearpay(Map extraParams) { - this.extraParams = extraParams; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String name; - public static class Builder { - private Map extraParams; + private String travelAuthorizationCode; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay build() { - return new PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay(this.extraParams); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Affiliate build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Affiliate( + this.code, this.extraParams, this.name, this.travelAuthorizationCode); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.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; } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.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; + } - private Alipay(Map extraParams) { - this.extraParams = extraParams; - } + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; + return this; + } - public static Builder builder() { - return new Builder(); + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + public Builder setTravelAuthorizationCode(String travelAuthorizationCode) { + this.travelAuthorizationCode = travelAuthorizationCode; + return this; + } + } } - public static class Builder { - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Insurance cost. */ + @SerializedName("amount") + Long amount; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Alipay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Alipay(this.extraParams); - } + /** Insurance currency. */ + @SerializedName("currency") + String currency; /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Alipay#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Insurance company name. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Required. Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Alma { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Long amount; - private Alma(Map extraParams) { - this.extraParams = extraParams; - } + private String currency; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + private String insuranceCompanyName; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Alma build() { - return new PaymentIntentCreateParams.PaymentMethodData.Alma(this.extraParams); - } + private InsuranceType insuranceType; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Alma#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Insurance build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Alma#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. Insurance cost. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; } - this.extraParams.putAll(map); - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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(); - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - public static class Builder { - private Map 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 + * PaymentIntentCreateParams.PaymentDetails.FlightData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.AmazonPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.AmazonPay(this.extraParams); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.AmazonPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Insurance company name. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.AmazonPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentDetails.FlightData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class AuBecsDebit { - /** Required. The account number for the bank account. */ - @SerializedName("account_number") - String accountNumber; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** Required. Bank-State-Branch number of the bank account. */ - @SerializedName("bsb_number") - String bsbNumber; + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("cancelation") + CANCELATION("cancelation"), - private AuBecsDebit(String accountNumber, String bsbNumber, Map extraParams) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; - this.extraParams = extraParams; - } + @SerializedName("emergency") + EMERGENCY("emergency"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("medical") + MEDICAL("medical"); - public static class Builder { - private String accountNumber; + @Getter(onMethod_ = {@Override}) + private final String value; - private String bsbNumber; + InsuranceType(String value) { + this.value = value; + } + } + } - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit build() { - return new PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit( - this.accountNumber, this.bsbNumber, this.extraParams); - } + /** Required. Passenger's full name. */ + @SerializedName("name") + String name; - /** Required. The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; + private Passenger(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; } - /** Required. Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - return this; + public static Builder builder() { + return new Builder(); } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static class Builder { + private Map extraParams; + + private String name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Passenger build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Passenger( + this.extraParams, this.name); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.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 + * PaymentIntentCreateParams.PaymentDetails.FlightData.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. Passenger's full name. */ + public Builder setName(String name) { + this.name = name; + return this; } - this.extraParams.putAll(map); - return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BacsDebit { - /** Account number of the bank account that the funds will be debited from. */ - @SerializedName("account_number") - String accountNumber; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Segment { + /** Segment fare amount. */ + @SerializedName("amount") + Long amount; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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. Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - @SerializedName("sort_code") - String sortCode; + /** Required. Airline carrier code. */ + @SerializedName("carrier_code") + String carrierCode; - private BacsDebit(String accountNumber, Map extraParams, String sortCode) { - this.accountNumber = accountNumber; - this.extraParams = extraParams; - this.sortCode = sortCode; - } + /** Carrier name. */ + @SerializedName("carrier_name") + String carrierName; - public static Builder builder() { - return new Builder(); - } + /** Segment currency. */ + @SerializedName("currency") + String currency; - public static class Builder { - private String accountNumber; + /** Required. Departure details. */ + @SerializedName("departure") + Departure departure; - private Map extraParams; + /** Exchange ticket number. */ + @SerializedName("exchange_ticket_number") + String exchangeTicketNumber; - private String sortCode; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.BacsDebit build() { - return new PaymentIntentCreateParams.PaymentMethodData.BacsDebit( - this.accountNumber, this.extraParams, this.sortCode); - } + /** Fare basis code. */ + @SerializedName("fare_basis_code") + String fareBasisCode; - /** Account number of the bank account that the funds will be debited from. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** Additional fees. */ + @SerializedName("fees") + Long fees; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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 PaymentIntentCreateParams.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; - } - } - } + /** Flight number. */ + @SerializedName("flight_number") + String flightNumber; - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** Stopover indicator. */ + @SerializedName("is_stop_over_indicator") + Boolean isStopOverIndicator; - private Bancontact(Map extraParams) { - this.extraParams = extraParams; - } + /** Refundable ticket indicator. */ + @SerializedName("refundable") + Boolean refundable; - public static Builder builder() { - return new Builder(); - } + /** Required. Class of service. */ + @SerializedName("service_class") + ServiceClass serviceClass; - public static class Builder { - private Map extraParams; + /** Tax amount for segment. */ + @SerializedName("tax_amount") + Long taxAmount; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Bancontact build() { - return new PaymentIntentCreateParams.PaymentMethodData.Bancontact(this.extraParams); - } + /** Ticket number. */ + @SerializedName("ticket_number") + String ticketNumber; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; + private Segment( + Long amount, + Arrival arrival, + String carrierCode, + String carrierName, + String currency, + Departure departure, + String exchangeTicketNumber, + Map extraParams, + String fareBasisCode, + Long fees, + String flightNumber, + Boolean isStopOverIndicator, + Boolean refundable, + ServiceClass serviceClass, + Long taxAmount, + String ticketNumber) { + this.amount = amount; + this.arrival = arrival; + this.carrierCode = carrierCode; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.exchangeTicketNumber = exchangeTicketNumber; + this.extraParams = extraParams; + this.fareBasisCode = fareBasisCode; + this.fees = fees; + this.flightNumber = flightNumber; + this.isStopOverIndicator = isStopOverIndicator; + this.refundable = refundable; + this.serviceClass = serviceClass; + this.taxAmount = taxAmount; + this.ticketNumber = ticketNumber; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; + public static Builder builder() { + return new Builder(); } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Billie { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Billie(Map extraParams) { - this.extraParams = extraParams; - } + public static class Builder { + private Long amount; - public static Builder builder() { - return new Builder(); - } + private Arrival arrival; - public static class Builder { - private Map extraParams; + private String carrierCode; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Billie build() { - return new PaymentIntentCreateParams.PaymentMethodData.Billie(this.extraParams); - } + private String carrierName; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Billie#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private String currency; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Billie#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + private Departure departure; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BillingDetails { - /** Billing address. */ - @SerializedName("address") - Object address; + private String exchangeTicketNumber; - /** Email address. */ - @SerializedName("email") - Object email; + private Map extraParams; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private String fareBasisCode; - /** Full name. */ - @SerializedName("name") - Object name; + private Long fees; - /** Billing phone number (including extension). */ - @SerializedName("phone") - Object phone; + private String flightNumber; - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - @SerializedName("tax_id") - String taxId; + private Boolean isStopOverIndicator; - private BillingDetails( - Object address, - Object email, - Map extraParams, - Object name, - Object phone, - String taxId) { - this.address = address; - this.email = email; - this.extraParams = extraParams; - this.name = name; - this.phone = phone; - this.taxId = taxId; - } + private Boolean refundable; - public static Builder builder() { - return new Builder(); - } + private ServiceClass serviceClass; - public static class Builder { - private Object address; + private Long taxAmount; - private Object email; + private String ticketNumber; - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Segment build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Segment( + this.amount, + this.arrival, + this.carrierCode, + this.carrierName, + this.currency, + this.departure, + this.exchangeTicketNumber, + this.extraParams, + this.fareBasisCode, + this.fees, + this.flightNumber, + this.isStopOverIndicator, + this.refundable, + this.serviceClass, + this.taxAmount, + this.ticketNumber); + } - private Object name; + /** Segment fare amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - private Object phone; + /** Required. Arrival details. */ + public Builder setArrival( + PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Arrival arrival) { + this.arrival = arrival; + return this; + } - private String taxId; + /** Required. Airline carrier code. */ + public Builder setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.BillingDetails build() { - return new PaymentIntentCreateParams.PaymentMethodData.BillingDetails( - this.address, this.email, this.extraParams, this.name, this.phone, this.taxId); - } + /** Carrier name. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } - /** Billing address. */ - public Builder setAddress( - PaymentIntentCreateParams.PaymentMethodData.BillingDetails.Address address) { - this.address = address; - return this; - } + /** Segment currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** Billing address. */ - public Builder setAddress(EmptyParam address) { - this.address = address; - return this; - } + /** Required. Departure details. */ + public Builder setDeparture( + PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Departure departure) { + this.departure = departure; + 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 PaymentIntentCreateParams.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 PaymentIntentCreateParams.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; - } - - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - public Builder setTaxId(String taxId) { - this.taxId = taxId; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the 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 PaymentIntentCreateParams.PaymentMethodData.BillingDetails.Address build() { - return new PaymentIntentCreateParams.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; - } + /** Exchange ticket number. */ + public Builder setExchangeTicketNumber(String exchangeTicketNumber) { + this.exchangeTicketNumber = exchangeTicketNumber; + return this; + } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentMethodData.BillingDetails.Address#extraParams} for the - * field documentation. + * PaymentIntentCreateParams.PaymentDetails.FlightData.Segment#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9922,8 +9615,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentCreateParams.PaymentMethodData.BillingDetails.Address#extraParams} for the - * field documentation. + * PaymentIntentCreateParams.PaymentDetails.FlightData.Segment#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9933,802 +9626,979 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; + /** Fare basis code. */ + public Builder setFareBasisCode(String fareBasisCode) { + this.fareBasisCode = fareBasisCode; return this; } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; + /** Additional fees. */ + public Builder setFees(Long fees) { + this.fees = fees; return this; } - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; + /** Flight number. */ + public Builder setFlightNumber(String flightNumber) { + this.flightNumber = flightNumber; return this; } - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; + /** Stopover indicator. */ + public Builder setIsStopOverIndicator(Boolean isStopOverIndicator) { + this.isStopOverIndicator = isStopOverIndicator; return this; } - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** Refundable ticket indicator. */ + public Builder setRefundable(Boolean refundable) { + this.refundable = refundable; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Blik build() { - return new PaymentIntentCreateParams.PaymentMethodData.Blik(this.extraParams); - } + /** Required. Class of service. */ + public Builder setServiceClass( + PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.ServiceClass + serviceClass) { + this.serviceClass = serviceClass; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Blik#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Tax amount for segment. */ + public Builder setTaxAmount(Long taxAmount) { + this.taxAmount = taxAmount; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Blik#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Ticket number. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Required. Arrival airport IATA code. */ + @SerializedName("airport") + String airport; - public static Builder builder() { - return new Builder(); - } + /** Arrival date/time. */ + @SerializedName("arrives_at") + Long arrivesAt; - public static class Builder { - private Map extraParams; + /** Arrival city. */ + @SerializedName("city") + String city; - private String taxId; + /** Arrival country. */ + @SerializedName("country") + String country; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Boleto build() { - return new PaymentIntentCreateParams.PaymentMethodData.Boleto( - this.extraParams, this.taxId); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map 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 PaymentIntentCreateParams.PaymentMethodData.Boleto#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Arrival( + String airport, + Long arrivesAt, + String city, + String country, + Map extraParams) { + this.airport = airport; + this.arrivesAt = arrivesAt; + this.city = city; + this.country = country; + this.extraParams = extraParams; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Boleto#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - 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; - } - } - } + public static class Builder { + private String airport; - @Getter - @EqualsAndHashCode(callSuper = false) - 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 Long arrivesAt; - private Cashapp(Map extraParams) { - this.extraParams = extraParams; - } + private String city; - public static Builder builder() { - return new Builder(); - } + private String country; - public static class Builder { - private Map extraParams; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Cashapp build() { - return new PaymentIntentCreateParams.PaymentMethodData.Cashapp(this.extraParams); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Arrival build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Arrival( + this.airport, this.arrivesAt, this.city, this.country, 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 PaymentIntentCreateParams.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; - } + /** Required. Arrival airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Cashapp#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Arrival date/time. */ + public Builder setArrivesAt(Long arrivesAt) { + this.arrivesAt = arrivesAt; + return this; + } + + /** Arrival city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Arrival country. */ + 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 + * PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Arrival#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Arrival#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } - this.extraParams.putAll(map); - return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Crypto { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Required. Departure airport IATA code. */ + @SerializedName("airport") + String airport; - private Crypto(Map extraParams) { - this.extraParams = extraParams; - } + /** Departure city. */ + @SerializedName("city") + String city; - public static Builder builder() { - return new Builder(); - } + /** Departure country. */ + @SerializedName("country") + String country; - public static class Builder { - private Map extraParams; + /** Required. Departure date/time. */ + @SerializedName("departs_at") + Long departsAt; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Crypto build() { - return new PaymentIntentCreateParams.PaymentMethodData.Crypto(this.extraParams); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map 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 PaymentIntentCreateParams.PaymentMethodData.Crypto#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Departure( + String airport, + String city, + String country, + Long departsAt, + Map extraParams) { + this.airport = airport; + this.city = city; + this.country = country; + this.departsAt = departsAt; + this.extraParams = extraParams; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Crypto#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static class Builder { + private String airport; - private CustomerBalance(Map extraParams) { - this.extraParams = extraParams; - } + private String city; - public static Builder builder() { - return new Builder(); - } + private String country; - public static class Builder { - private Map extraParams; + private Long departsAt; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.CustomerBalance build() { - return new PaymentIntentCreateParams.PaymentMethodData.CustomerBalance(this.extraParams); - } + private Map 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 PaymentIntentCreateParams.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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Departure build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Departure( + this.airport, this.city, this.country, this.departsAt, this.extraParams); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.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; - } - } - } + /** Required. Departure airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Eps { - /** The customer's bank. */ - @SerializedName("bank") - Bank bank; + /** Departure city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Departure country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private Eps(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + /** Required. Departure date/time. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - public static class Builder { - private Bank bank; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Segment.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - private Map extraParams; + public enum ServiceClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Eps build() { - return new PaymentIntentCreateParams.PaymentMethodData.Eps(this.bank, this.extraParams); - } + @SerializedName("economy") + ECONOMY("economy"), - /** The customer's bank. */ - public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.Eps.Bank bank) { - this.bank = bank; - return this; - } + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Eps#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceClass(String value) { + this.value = value; } - 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"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Total { + /** Required. Total flight amount. */ + @SerializedName("amount") + Long amount; - @SerializedName("bank_austria") - BANK_AUSTRIA("bank_austria"), + /** Reason for credit. */ + @SerializedName("credit_reason") + CreditReason creditReason; - @SerializedName("bankhaus_carl_spangler") - BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), + /** Total currency. */ + @SerializedName("currency") + String currency; - @SerializedName("bankhaus_schelhammer_und_schattera_ag") - BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), + /** Discount details. */ + @SerializedName("discounts") + Discounts discounts; - @SerializedName("bawag_psk_ag") - BAWAG_PSK_AG("bawag_psk_ag"), + /** Additional charges. */ + @SerializedName("extra_charges") + List extraCharges; - @SerializedName("bks_bank_ag") - BKS_BANK_AG("bks_bank_ag"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("brull_kallmus_bank_ag") - BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), + /** Tax breakdown. */ + @SerializedName("tax") + Tax tax; - @SerializedName("btv_vier_lander_bank") - BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), + private Total( + Long amount, + CreditReason creditReason, + String currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Tax tax) { + this.amount = amount; + this.creditReason = creditReason; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; + this.extraParams = extraParams; + this.tax = tax; + } - @SerializedName("capital_bank_grawe_gruppe_ag") - CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("deutsche_bank_ag") - DEUTSCHE_BANK_AG("deutsche_bank_ag"), + public static class Builder { + private Long amount; - @SerializedName("dolomitenbank") - DOLOMITENBANK("dolomitenbank"), + private CreditReason creditReason; - @SerializedName("easybank_ag") - EASYBANK_AG("easybank_ag"), + private String currency; - @SerializedName("erste_bank_und_sparkassen") - ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), + private Discounts discounts; - @SerializedName("hypo_alpeadriabank_international_ag") - HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), + private List + extraCharges; - @SerializedName("hypo_bank_burgenland_aktiengesellschaft") - HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), + private Map extraParams; - @SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien") - HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), + private Tax tax; - @SerializedName("hypo_oberosterreich_salzburg_steiermark") - HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Total build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total( + this.amount, + this.creditReason, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.tax); + } - @SerializedName("hypo_tirol_bank_ag") - HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"), + /** Required. Total flight amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - @SerializedName("hypo_vorarlberg_bank_ag") - HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"), + /** Reason for credit. */ + public Builder setCreditReason( + PaymentIntentCreateParams.PaymentDetails.FlightData.Total.CreditReason creditReason) { + this.creditReason = creditReason; + return this; + } - @SerializedName("marchfelder_bank") - MARCHFELDER_BANK("marchfelder_bank"), + /** Total currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @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"), + /** Discount details. */ + public Builder setDiscounts( + PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Discounts discounts) { + this.discounts = discounts; + return this; + } - @SerializedName("volksbank_gruppe") - VOLKSBANK_GRUPPE("volksbank_gruppe"), + /** + * 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 + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentCreateParams.PaymentDetails.FlightData.Total.ExtraCharge element) { + if (this.extraCharges == null) { + this.extraCharges = new ArrayList<>(); + } + this.extraCharges.add(element); + return this; + } - @SerializedName("volkskreditbank_ag") - VOLKSKREDITBANK_AG("volkskreditbank_ag"), + /** + * 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 PaymentIntentCreateParams.PaymentDetails.FlightData.Total#extraCharges} for + * the field documentation. + */ + public Builder addAllExtraCharge( + List + elements) { + if (this.extraCharges == null) { + this.extraCharges = new ArrayList<>(); + } + this.extraCharges.addAll(elements); + return this; + } - @SerializedName("vr_bank_braunau") - VR_BANK_BRAUNAU("vr_bank_braunau"); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FlightData.Total#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FlightData.Total#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - Bank(String value) { - this.value = value; + /** Tax breakdown. */ + public Builder setTax(PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax tax) { + this.tax = tax; + return this; + } } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - private Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) { - this.accountHolderType = accountHolderType; - this.bank = bank; - this.extraParams = extraParams; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + private Discounts(String corporateClientCode, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.extraParams = extraParams; + } - public static class Builder { - private AccountHolderType accountHolderType; + public static Builder builder() { + return new Builder(); + } - private Bank bank; + public static class Builder { + private String corporateClientCode; - private Map extraParams; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Fpx build() { - return new PaymentIntentCreateParams.PaymentMethodData.Fpx( - this.accountHolderType, this.bank, this.extraParams); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Discounts build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Discounts( + this.corporateClientCode, this.extraParams); + } - /** Account holder type for FPX transaction. */ - public Builder setAccountHolderType( - PaymentIntentCreateParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - /** Required. The customer's bank. */ - public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.Fpx.Bank bank) { - this.bank = bank; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Fpx#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Fpx#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of additional charges. */ + @SerializedName("amount") + Long amount; - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("individual") - INDIVIDUAL("individual"); + /** Type of additional charges. */ + @SerializedName("type") + Type type; - @Getter(onMethod_ = {@Override}) - private final String value; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } - AccountHolderType(String value) { - this.value = value; - } - } + public static Builder builder() { + return new Builder(); + } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("affin_bank") - AFFIN_BANK("affin_bank"), + public static class Builder { + private Long amount; - @SerializedName("agrobank") - AGROBANK("agrobank"), + private Map extraParams; - @SerializedName("alliance_bank") - ALLIANCE_BANK("alliance_bank"), + private Type type; - @SerializedName("ambank") - AMBANK("ambank"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.ExtraCharge build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } - @SerializedName("bank_islam") - BANK_ISLAM("bank_islam"), + /** Amount of additional charges. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - @SerializedName("bank_muamalat") - BANK_MUAMALAT("bank_muamalat"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("bank_of_china") - BANK_OF_CHINA("bank_of_china"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - @SerializedName("bank_rakyat") - BANK_RAKYAT("bank_rakyat"), + /** Type of additional charges. */ + public Builder setType( + PaymentIntentCreateParams.PaymentDetails.FlightData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } + } - @SerializedName("bsn") - BSN("bsn"), + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("additional_fees") + ADDITIONAL_FEES("additional_fees"), - @SerializedName("cimb") - CIMB("cimb"), + @SerializedName("ancillary_service_charges") + ANCILLARY_SERVICE_CHARGES("ancillary_service_charges"), - @SerializedName("deutsche_bank") - DEUTSCHE_BANK("deutsche_bank"), + @SerializedName("exchange_fee") + EXCHANGE_FEE("exchange_fee"); - @SerializedName("hong_leong_bank") - HONG_LEONG_BANK("hong_leong_bank"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("hsbc") - HSBC("hsbc"), + Type(String value) { + this.value = value; + } + } + } - @SerializedName("kfh") - KFH("kfh"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("maybank2e") - MAYBANK2E("maybank2e"), + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; - @SerializedName("maybank2u") - MAYBANK2U("maybank2u"), + private Tax( + Map extraParams, + List taxes) { + this.extraParams = extraParams; + this.taxes = taxes; + } - @SerializedName("ocbc") - OCBC("ocbc"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("pb_enterprise") - PB_ENTERPRISE("pb_enterprise"), + public static class Builder { + private Map extraParams; - @SerializedName("public_bank") - PUBLIC_BANK("public_bank"), + private List taxes; - @SerializedName("rhb") - RHB("rhb"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax( + this.extraParams, this.taxes); + } - @SerializedName("standard_chartered") - STANDARD_CHARTERED("standard_chartered"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.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; + } - @SerializedName("uob") - UOB("uob"); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.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(onMethod_ = {@Override}) - private final String value; + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - Bank(String value) { - this.value = value; - } - } - } + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Giropay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; - private Giropay(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** Tax rate. */ + @SerializedName("rate") + Long rate; - public static class Builder { - private Map extraParams; + /** Type of tax. */ + @SerializedName("type") + String type; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Giropay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Giropay(this.extraParams); - } + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Giropay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.Tax build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.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 + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.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; + } + + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Giropay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum CreditReason implements ApiRequestParams.EnumParam { + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_ticket_refund") + PARTIAL_TICKET_REFUND("partial_ticket_refund"), + + @SerializedName("passenger_transport_ancillary_cancellation") + PASSENGER_TRANSPORT_ANCILLARY_CANCELLATION("passenger_transport_ancillary_cancellation"), + + @SerializedName("ticket_and_ancillary_cancellation") + TICKET_AND_ANCILLARY_CANCELLATION("ticket_and_ancillary_cancellation"), + + @SerializedName("ticket_cancellation") + TICKET_CANCELLATION("ticket_cancellation"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CreditReason(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; + } + } + + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("exchange_ticket") + EXCHANGE_TICKET("exchange_ticket"), + + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), + + @SerializedName("refund") + REFUND("refund"), + + @SerializedName("ticket_purchase") + TICKET_PURCHASE("ticket_purchase"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionType(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Gopay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Lodging { + /** The lodging location's address. */ + @SerializedName("address") + Address address; - private Gopay(Map extraParams) { - this.extraParams = extraParams; - } + /** The number of adults on the booking. */ + @SerializedName("adults") + Long adults; - public static Builder builder() { - return new Builder(); - } + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - public static class Builder { - private Map extraParams; + /** The booking number associated with the lodging reservation. */ + @SerializedName("booking_number") + String bookingNumber; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Gopay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Gopay(this.extraParams); - } + /** The lodging category. */ + @SerializedName("category") + Category category; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Gopay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Required. Lodging check-in time. Measured in seconds since the Unix epoch. + */ + @SerializedName("checkin_at") + Long checkinAt; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Gopay#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. 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; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Grabpay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -10738,71 +10608,94 @@ public static class Grabpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Grabpay(Map extraParams) { - this.extraParams = extraParams; - } + /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ + @SerializedName("fire_safety_act_compliance") + Boolean fireSafetyActCompliance; - public static Builder builder() { - return new Builder(); - } + /** The name of the lodging location. */ + @SerializedName("name") + String name; - public static class Builder { - private Map extraParams; + /** + * Indicates if the customer did not keep their booking while failing to cancel the + * reservation. + */ + @SerializedName("no_show") + Boolean noShow; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Grabpay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Grabpay(this.extraParams); - } + /** The number of rooms on the booking. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Grabpay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The details of the passengers in the travel reservation. */ + @SerializedName("passengers") + List passengers; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Grabpay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + /** The phone number of the lodging location. */ + @SerializedName("property_phone_number") + String propertyPhoneNumber; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class IdBankTransfer { - /** Bank where the account is held. */ - @SerializedName("bank") - Bank bank; + /** The room class for this purchase. */ + @SerializedName("room_class") + String roomClass; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 number of room nights. */ + @SerializedName("room_nights") + Long roomNights; - private IdBankTransfer(Bank bank, Map extraParams) { - this.bank = bank; + /** 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() { @@ -10810,128 +10703,181 @@ public static Builder builder() { } public static class Builder { - private Bank bank; + private Address address; - private Map extraParams; + private Long adults; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer build() { - return new PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer( - this.bank, this.extraParams); - } + private Affiliate affiliate; - /** Bank where the account is held. */ - public Builder setBank( - PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer.Bank bank) { - this.bank = bank; - return this; - } + private String bookingNumber; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Category category; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } + private Long checkinAt; - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("bca") - BCA("bca"), + private Long checkoutAt; - @SerializedName("bni") - BNI("bni"), + private String customerServicePhoneNumber; - @SerializedName("bri") - BRI("bri"), + private Long dailyRoomRateAmount; - @SerializedName("cimb") - CIMB("cimb"), + private Delivery delivery; - @SerializedName("permata") - PERMATA("permata"); + private List extraCharges; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - Bank(String value) { - this.value = value; - } - } - } + private Boolean fireSafetyActCompliance; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Ideal { - /** - * The customer's bank. Only use this parameter for existing customers. Don't use it for new - * customers. - */ - @SerializedName("bank") - Bank bank; + private String name; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Boolean noShow; - private Ideal(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + private Long numberOfRooms; - public static Builder builder() { - return new Builder(); - } + private List passengers; - public static class Builder { - private Bank bank; + private String propertyPhoneNumber; - private Map extraParams; + private String roomClass; + + private Long roomNights; + + private Long totalRoomTaxAmount; + + private Long totalTaxAmount; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Ideal build() { - return new PaymentIntentCreateParams.PaymentMethodData.Ideal(this.bank, this.extraParams); + public PaymentIntentCreateParams.PaymentDetails.Lodging build() { + return new PaymentIntentCreateParams.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( + PaymentIntentCreateParams.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( + PaymentIntentCreateParams.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( + PaymentIntentCreateParams.PaymentDetails.Lodging.Category category) { + this.category = category; + return this; } /** - * The customer's bank. Only use this parameter for existing customers. Don't use it for new - * customers. + * Required. Lodging check-in time. Measured in seconds since the Unix + * epoch. */ - public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.Ideal.Bank bank) { - this.bank = bank; + 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( + PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.PaymentDetails.Lodging#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentMethodData.Ideal#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentDetails.Lodging#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -10945,7 +10891,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Ideal#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentDetails.Lodging#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -10955,261 +10901,106 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("abn_amro") - ABN_AMRO("abn_amro"), - - @SerializedName("asn_bank") - ASN_BANK("asn_bank"), - - @SerializedName("bunq") - BUNQ("bunq"), - @SerializedName("buut") - BUUT("buut"), - - @SerializedName("handelsbanken") - HANDELSBANKEN("handelsbanken"), + /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ + public Builder setFireSafetyActCompliance(Boolean fireSafetyActCompliance) { + this.fireSafetyActCompliance = fireSafetyActCompliance; + return this; + } - @SerializedName("ing") - ING("ing"), + /** The name of the lodging location. */ + public Builder setName(String name) { + this.name = name; + return this; + } - @SerializedName("knab") - KNAB("knab"), + /** + * 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; + } - @SerializedName("moneyou") - MONEYOU("moneyou"), - - @SerializedName("n26") - N26("n26"), - - @SerializedName("nn") - NN("nn"), - - @SerializedName("rabobank") - RABOBANK("rabobank"), - - @SerializedName("regiobank") - REGIOBANK("regiobank"), - - @SerializedName("revolut") - REVOLUT("revolut"), - - @SerializedName("sns_bank") - SNS_BANK("sns_bank"), - - @SerializedName("triodos_bank") - TRIODOS_BANK("triodos_bank"), - - @SerializedName("van_lanschot") - VAN_LANSCHOT("van_lanschot"), - - @SerializedName("yoursafe") - YOURSAFE("yoursafe"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - Bank(String value) { - this.value = value; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class InteracPresent { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private InteracPresent(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.InteracPresent build() { - return new PaymentIntentCreateParams.PaymentMethodData.InteracPresent(this.extraParams); - } + /** The number of rooms on the booking. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + return this; + } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.InteracPresent#extraParams} - * for the field documentation. + * 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 + * PaymentIntentCreateParams.PaymentDetails.Lodging#passengers} for the field documentation. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addPassenger( + PaymentIntentCreateParams.PaymentDetails.Lodging.Passenger element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); } - this.extraParams.put(key, value); + this.passengers.add(element); return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.InteracPresent#extraParams} - * for the field documentation. + * 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 + * PaymentIntentCreateParams.PaymentDetails.Lodging#passengers} for the field documentation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addAllPassenger( + List elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); } - this.extraParams.putAll(map); + this.passengers.addAll(elements); return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KakaoPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private KakaoPay(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 PaymentIntentCreateParams.PaymentMethodData.KakaoPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.KakaoPay(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 PaymentIntentCreateParams.PaymentMethodData.KakaoPay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + /** The phone number of the lodging location. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.KakaoPay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + /** The room class for this purchase. */ + public Builder setRoomClass(String roomClass) { + this.roomClass = roomClass; return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Klarna { - /** Customer's date of birth. */ - @SerializedName("dob") - Dob dob; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Klarna(Dob dob, Map extraParams) { - this.dob = dob; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Dob dob; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Klarna build() { - return new PaymentIntentCreateParams.PaymentMethodData.Klarna(this.dob, this.extraParams); - } - /** Customer's date of birth. */ - public Builder setDob(PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob dob) { - this.dob = dob; + /** The number of room nights. */ + public Builder setRoomNights(Long roomNights) { + this.roomNights = roomNights; return this; } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Klarna#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + /** The total tax amount associating with the room reservation. */ + public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { + this.totalRoomTaxAmount = totalRoomTaxAmount; return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Klarna#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + /** The total tax amount. */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Dob { - /** Required. The day of birth, between 1 and 31. */ - @SerializedName("day") - Long day; + 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 @@ -11221,51 +11012,90 @@ public static class Dob { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The month of birth, between 1 and 12. */ - @SerializedName("month") - Long month; + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; - /** Required. The four-digit year of birth. */ - @SerializedName("year") - Long year; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - private Dob(Long day, Map extraParams, Long month, Long year) { - this.day = day; - this.extraParams = extraParams; - this.month = month; - this.year = year; - } + /** 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 Long day; + private String city; + + private String country; private Map extraParams; - private Long month; + private String line1; - private Long year; + private String line2; + + private String postalCode; + + private String state; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob build() { - return new PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob( - this.day, this.extraParams, this.month, this.year); + public PaymentIntentCreateParams.PaymentDetails.Lodging.Address build() { + return new PaymentIntentCreateParams.PaymentDetails.Lodging.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); } - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; + /** 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 PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentDetails.Lodging.Address#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11278,8 +11108,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentDetails.Lodging.Address#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11289,484 +11119,463 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; return this; } - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Konbini { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Konbini(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Konbini build() { - return new PaymentIntentCreateParams.PaymentMethodData.Konbini(this.extraParams); - } + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Konbini#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; } - this.extraParams.put(key, value); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Konbini#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + @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; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KrCard { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - private KrCard(Map extraParams) { - this.extraParams = extraParams; - } + public static class Builder { + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String name; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Lodging.Affiliate build() { + return new PaymentIntentCreateParams.PaymentDetails.Lodging.Affiliate( + this.extraParams, this.name); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.KrCard build() { - return new PaymentIntentCreateParams.PaymentMethodData.KrCard(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 PaymentIntentCreateParams.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 a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.KrCard#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.KrCard#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + return this; } - this.extraParams.putAll(map); - return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Link { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Link(Map extraParams) { - this.extraParams = extraParams; - } + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - public static Builder builder() { - return new Builder(); - } + /** The delivery method for the payment. */ + @SerializedName("mode") + Mode mode; - public static class Builder { - private Map extraParams; + /** Details of the recipient. */ + @SerializedName("recipient") + Recipient recipient; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Link build() { - return new PaymentIntentCreateParams.PaymentMethodData.Link(this.extraParams); + private Delivery(Map extraParams, Mode mode, Recipient recipient) { + this.extraParams = extraParams; + this.mode = mode; + this.recipient = 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 PaymentIntentCreateParams.PaymentMethodData.Link#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + public static Builder builder() { + return new Builder(); } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Link#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + public static class Builder { + private Map extraParams; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MbWay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Mode mode; - private MbWay(Map extraParams) { - this.extraParams = extraParams; - } + private Recipient recipient; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery build() { + return new PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery( + this.extraParams, this.mode, this.recipient); + } - public static class Builder { - private Map 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 PaymentIntentCreateParams.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.MbWay build() { - return new PaymentIntentCreateParams.PaymentMethodData.MbWay(this.extraParams); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.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; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Mode mode) { + this.mode = mode; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; } - this.extraParams.putAll(map); - return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Mobilepay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - private Mobilepay(Map extraParams) { - this.extraParams = extraParams; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @SerializedName("email") + String email; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + String name; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Mobilepay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Mobilepay(this.extraParams); - } + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + String phone; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Mobilepay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Recipient( + String email, Map extraParams, String name, String phone) { + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Mobilepay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Multibanco { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private String email; - private Multibanco(Map extraParams) { - this.extraParams = extraParams; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String name; - public static class Builder { - private Map extraParams; + private String phone; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Multibanco build() { - return new PaymentIntentCreateParams.PaymentMethodData.Multibanco(this.extraParams); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new PaymentIntentCreateParams.PaymentDetails.Lodging.Delivery.Recipient( + this.email, this.extraParams, this.name, this.phone); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Multibanco#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Multibanco#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.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; + } } - this.extraParams.putAll(map); - return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NaverPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. - */ - @SerializedName("funding") - Funding funding; + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("email") + EMAIL("email"), - private NaverPay(Map extraParams, Funding funding) { - this.extraParams = extraParams; - this.funding = funding; - } + @SerializedName("phone") + PHONE("phone"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("pickup") + PICKUP("pickup"), - public static class Builder { - private Map extraParams; + @SerializedName("post") + POST("post"); - private Funding funding; + @Getter(onMethod_ = {@Override}) + private final String value; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.NaverPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.NaverPay( - this.extraParams, this.funding); + Mode(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passenger { /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.NaverPay#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.NaverPay#extraParams} for the - * field documentation. + * Required. Full name of the person or entity on the lodging reservation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + @SerializedName("name") + String name; + + private Passenger(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; } - /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. - */ - public Builder setFunding( - PaymentIntentCreateParams.PaymentMethodData.NaverPay.Funding funding) { - this.funding = funding; - return this; + 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 PaymentIntentCreateParams.PaymentDetails.Lodging.Passenger build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 Funding implements ApiRequestParams.EnumParam { - @SerializedName("card") - CARD("card"), + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("hotel") + HOTEL("hotel"), - @SerializedName("points") - POINTS("points"); + @SerializedName("vacation_rental") + VACATION_RENTAL("vacation_rental"); @Getter(onMethod_ = {@Override}) private final String value; - Funding(String value) { + Category(String value) { this.value = value; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NzBankAccount { - /** - * The name on the bank account. Only required if the account holder name is different from - * the name of the authorized signatory collected in the PaymentMethod’s billing details. - */ - @SerializedName("account_holder_name") - String accountHolderName; + public enum ExtraCharge implements ApiRequestParams.EnumParam { + @SerializedName("gift_shop") + GIFT_SHOP("gift_shop"), - /** Required. The account number for the bank account. */ - @SerializedName("account_number") - String accountNumber; + @SerializedName("laundry") + LAUNDRY("laundry"), - /** Required. The numeric code for the bank account's bank. */ - @SerializedName("bank_code") - String bankCode; + @SerializedName("mini_bar") + MINI_BAR("mini_bar"), - /** Required. The numeric code for the bank account's bank branch. */ - @SerializedName("branch_code") - String branchCode; + @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 + @EqualsAndHashCode(callSuper = false) + public static class LodgingData { + /** Accommodation details for the lodging. */ + @SerializedName("accommodation") + Accommodation accommodation; + + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Booking confirmation number for the lodging. */ + @SerializedName("booking_number") + String bookingNumber; + + /** Required. Check-in date. */ + @SerializedName("checkin_at") + Long checkinAt; + + /** Required. Check-out date. */ + @SerializedName("checkout_at") + Long checkoutAt; + + /** Customer service phone number for the lodging company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; /** * Map of extra parameters for custom features not available in this client library. The @@ -11777,28 +11586,69 @@ public static class NzBankAccount { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - @SerializedName("reference") - String reference; + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + @SerializedName("fire_safety_act_compliance_indicator") + Boolean fireSafetyActComplianceIndicator; - /** Required. The suffix of the bank account number. */ - @SerializedName("suffix") - String suffix; + /** List of guests for the lodging. */ + @SerializedName("guests") + List guests; - private NzBankAccount( - String accountHolderName, - String accountNumber, - String bankCode, - String branchCode, + /** Host details for the lodging. */ + @SerializedName("host") + Host host; + + /** List of insurances for the lodging. */ + @SerializedName("insurances") + List insurances; + + /** Whether the renter is a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; + + /** Renter ID number for the lodging. */ + @SerializedName("renter_id_number") + String renterIdNumber; + + /** Renter name for the lodging. */ + @SerializedName("renter_name") + String renterName; + + /** Required. Total details for the lodging. */ + @SerializedName("total") + Total total; + + private LodgingData( + Accommodation accommodation, + Affiliate affiliate, + String bookingNumber, + Long checkinAt, + Long checkoutAt, + String customerServicePhoneNumber, Map extraParams, - String reference, - String suffix) { - this.accountHolderName = accountHolderName; - this.accountNumber = accountNumber; - this.bankCode = bankCode; - this.branchCode = branchCode; + Boolean fireSafetyActComplianceIndicator, + List guests, + Host host, + List insurances, + Boolean noShowIndicator, + String renterIdNumber, + String renterName, + Total total) { + this.accommodation = accommodation; + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.checkinAt = checkinAt; + this.checkoutAt = checkoutAt; + this.customerServicePhoneNumber = customerServicePhoneNumber; this.extraParams = extraParams; - this.reference = reference; - this.suffix = suffix; + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + this.guests = guests; + this.host = host; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.renterIdNumber = renterIdNumber; + this.renterName = renterName; + this.total = total; } public static Builder builder() { @@ -11806,64 +11656,99 @@ public static Builder builder() { } public static class Builder { - private String accountHolderName; + private Accommodation accommodation; - private String accountNumber; + private Affiliate affiliate; - private String bankCode; + private String bookingNumber; - private String branchCode; + private Long checkinAt; + + private Long checkoutAt; + + private String customerServicePhoneNumber; private Map extraParams; - private String reference; + private Boolean fireSafetyActComplianceIndicator; - private String suffix; + private List guests; + + private Host host; + + private List insurances; + + private Boolean noShowIndicator; + + private String renterIdNumber; + + private String renterName; + + private Total total; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.NzBankAccount build() { - return new PaymentIntentCreateParams.PaymentMethodData.NzBankAccount( - this.accountHolderName, - this.accountNumber, - this.bankCode, - this.branchCode, + public PaymentIntentCreateParams.PaymentDetails.LodgingData build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData( + this.accommodation, + this.affiliate, + this.bookingNumber, + this.checkinAt, + this.checkoutAt, + this.customerServicePhoneNumber, this.extraParams, - this.reference, - this.suffix); + this.fireSafetyActComplianceIndicator, + this.guests, + this.host, + this.insurances, + this.noShowIndicator, + this.renterIdNumber, + this.renterName, + this.total); } - /** - * The name on the bank account. Only required if the account holder name is different from - * the name of the authorized signatory collected in the PaymentMethod’s billing details. - */ - public Builder setAccountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; + /** Accommodation details for the lodging. */ + public Builder setAccommodation( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Accommodation accommodation) { + this.accommodation = accommodation; return this; } - /** Required. The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - /** Required. The numeric code for the bank account's bank. */ - public Builder setBankCode(String bankCode) { - this.bankCode = bankCode; + /** Booking confirmation number for the lodging. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** Required. The numeric code for the bank account's bank branch. */ - public Builder setBranchCode(String branchCode) { - this.branchCode = branchCode; + /** Required. Check-in date. */ + public Builder setCheckinAt(Long checkinAt) { + this.checkinAt = checkinAt; + return this; + } + + /** Required. Check-out date. */ + public Builder setCheckoutAt(Long checkoutAt) { + this.checkoutAt = checkoutAt; + return this; + } + + /** Customer service phone number for the lodging company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.NzBankAccount#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentDetails.LodgingData#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11876,8 +11761,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.NzBankAccount#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentDetails.LodgingData#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11887,955 +11772,1002 @@ public Builder putAllExtraParam(Map map) { return this; } - public Builder setReference(String reference) { - this.reference = reference; + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + public Builder setFireSafetyActComplianceIndicator( + Boolean fireSafetyActComplianceIndicator) { + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; return this; } - /** Required. The suffix of the bank account number. */ - public Builder setSuffix(String suffix) { - this.suffix = suffix; + /** + * Add an element to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData#guests} for the field documentation. + */ + public Builder addGuest( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Guest element) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.add(element); return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Oxxo { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Oxxo(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - public static class Builder { - private Map extraParams; + /** + * Add all elements to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData#guests} for the field documentation. + */ + public Builder addAllGuest( + List elements) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.addAll(elements); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Oxxo build() { - return new PaymentIntentCreateParams.PaymentMethodData.Oxxo(this.extraParams); + /** Host details for the lodging. */ + public Builder setHost(PaymentIntentCreateParams.PaymentDetails.LodgingData.Host host) { + this.host = host; + return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Oxxo#extraParams} for the - * field documentation. + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData#insurances} for the field + * documentation. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addInsurance( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); } - this.extraParams.put(key, value); + this.insurances.add(element); return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Oxxo#extraParams} for the - * field documentation. + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData#insurances} for the field + * documentation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); } - this.extraParams.putAll(map); + this.insurances.addAll(elements); return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class P24 { - /** The customer's bank. */ - @SerializedName("bank") - Bank bank; + /** Whether the renter is a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Renter ID number for the lodging. */ + public Builder setRenterIdNumber(String renterIdNumber) { + this.renterIdNumber = renterIdNumber; + return this; + } - private P24(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + /** Renter name for the lodging. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } - public static Builder builder() { - return new Builder(); + /** Required. Total details for the lodging. */ + public Builder setTotal(PaymentIntentCreateParams.PaymentDetails.LodgingData.Total total) { + this.total = total; + return this; + } } - public static class Builder { - private Bank bank; - - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Accommodation { + /** Type of accommodation. */ + @SerializedName("accommodation_type") + AccommodationType accommodationType; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.P24 build() { - return new PaymentIntentCreateParams.PaymentMethodData.P24(this.bank, this.extraParams); - } + /** Bed type. */ + @SerializedName("bed_type") + String bedType; - /** The customer's bank. */ - public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.P24.Bank bank) { - this.bank = bank; - return this; - } + /** Daily accommodation rate in cents. */ + @SerializedName("daily_rate_amount") + Long dailyRateAmount; /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.P24#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.P24#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } + /** Number of nights. */ + @SerializedName("nights") + Long nights; - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("alior_bank") - ALIOR_BANK("alior_bank"), + /** Number of rooms, cabanas, apartments, and so on. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; - @SerializedName("bank_millennium") - BANK_MILLENNIUM("bank_millennium"), + /** Rate type. */ + @SerializedName("rate_type") + String rateType; - @SerializedName("bank_nowy_bfg_sa") - BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), + /** Whether smoking is allowed. */ + @SerializedName("smoking_indicator") + Boolean smokingIndicator; - @SerializedName("bank_pekao_sa") - BANK_PEKAO_SA("bank_pekao_sa"), + private Accommodation( + AccommodationType accommodationType, + String bedType, + Long dailyRateAmount, + Map extraParams, + Long nights, + Long numberOfRooms, + String rateType, + Boolean smokingIndicator) { + this.accommodationType = accommodationType; + this.bedType = bedType; + this.dailyRateAmount = dailyRateAmount; + this.extraParams = extraParams; + this.nights = nights; + this.numberOfRooms = numberOfRooms; + this.rateType = rateType; + this.smokingIndicator = smokingIndicator; + } - @SerializedName("banki_spbdzielcze") - BANKI_SPBDZIELCZE("banki_spbdzielcze"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("blik") - BLIK("blik"), + public static class Builder { + private AccommodationType accommodationType; - @SerializedName("bnp_paribas") - BNP_PARIBAS("bnp_paribas"), + private String bedType; - @SerializedName("boz") - BOZ("boz"), + private Long dailyRateAmount; - @SerializedName("citi_handlowy") - CITI_HANDLOWY("citi_handlowy"), + private Map extraParams; - @SerializedName("credit_agricole") - CREDIT_AGRICOLE("credit_agricole"), + private Long nights; - @SerializedName("envelobank") - ENVELOBANK("envelobank"), + private Long numberOfRooms; - @SerializedName("etransfer_pocztowy24") - ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), + private String rateType; - @SerializedName("getin_bank") - GETIN_BANK("getin_bank"), + private Boolean smokingIndicator; - @SerializedName("ideabank") - IDEABANK("ideabank"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Accommodation build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Accommodation( + this.accommodationType, + this.bedType, + this.dailyRateAmount, + this.extraParams, + this.nights, + this.numberOfRooms, + this.rateType, + this.smokingIndicator); + } - @SerializedName("ing") - ING("ing"), + /** Type of accommodation. */ + public Builder setAccommodationType( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Accommodation.AccommodationType + accommodationType) { + this.accommodationType = accommodationType; + return this; + } - @SerializedName("inteligo") - INTELIGO("inteligo"), + /** Bed type. */ + public Builder setBedType(String bedType) { + this.bedType = bedType; + return this; + } - @SerializedName("mbank_mtransfer") - MBANK_MTRANSFER("mbank_mtransfer"), + /** Daily accommodation rate in cents. */ + public Builder setDailyRateAmount(Long dailyRateAmount) { + this.dailyRateAmount = dailyRateAmount; + return this; + } - @SerializedName("nest_przelew") - NEST_PRZELEW("nest_przelew"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Accommodation#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("noble_pay") - NOBLE_PAY("noble_pay"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Accommodation#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - @SerializedName("pbac_z_ipko") - PBAC_Z_IPKO("pbac_z_ipko"), + /** Number of nights. */ + public Builder setNights(Long nights) { + this.nights = nights; + return this; + } - @SerializedName("plus_bank") - PLUS_BANK("plus_bank"), + /** Number of rooms, cabanas, apartments, and so on. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + return this; + } - @SerializedName("santander_przelew24") - SANTANDER_PRZELEW24("santander_przelew24"), + /** Rate type. */ + public Builder setRateType(String rateType) { + this.rateType = rateType; + return this; + } - @SerializedName("tmobile_usbugi_bankowe") - TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), + /** Whether smoking is allowed. */ + public Builder setSmokingIndicator(Boolean smokingIndicator) { + this.smokingIndicator = smokingIndicator; + return this; + } + } - @SerializedName("toyota_bank") - TOYOTA_BANK("toyota_bank"), + public enum AccommodationType implements ApiRequestParams.EnumParam { + @SerializedName("apartment") + APARTMENT("apartment"), - @SerializedName("velobank") - VELOBANK("velobank"), + @SerializedName("cabana") + CABANA("cabana"), - @SerializedName("volkswagen_bank") - VOLKSWAGEN_BANK("volkswagen_bank"); + @SerializedName("house") + HOUSE("house"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("penthouse") + PENTHOUSE("penthouse"), - Bank(String value) { - this.value = value; - } - } - } + @SerializedName("room") + ROOM("room"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PayByBank { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("standard") + STANDARD("standard"), - private PayByBank(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("suite") + SUITE("suite"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("villa") + VILLA("villa"); - public static class Builder { - private Map extraParams; + @Getter(onMethod_ = {@Override}) + private final String value; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.PayByBank build() { - return new PaymentIntentCreateParams.PaymentMethodData.PayByBank(this.extraParams); + AccommodationType(String value) { + this.value = value; + } } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + String code; /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for - * the field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Affiliate partner name. */ + @SerializedName("name") + String name; + + private Affiliate(String code, Map extraParams, String name) { + this.code = code; + this.extraParams = extraParams; + this.name = name; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Payco { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private String code; - private Payco(Map extraParams) { - this.extraParams = extraParams; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String name; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Affiliate build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Affiliate( + this.code, this.extraParams, this.name); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Payco build() { - return new PaymentIntentCreateParams.PaymentMethodData.Payco(this.extraParams); - } + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payco#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.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 + * PaymentIntentCreateParams.PaymentDetails.LodgingData.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; + } + + /** Affiliate partner name. */ + public Builder setName(String name) { + this.name = name; + return this; } - this.extraParams.put(key, value); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Guest { /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payco#extraParams} for the - * field documentation. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Guest's full name. */ + @SerializedName("name") + String name; + + private Guest(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Paynow { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - private Paynow(Map extraParams) { - this.extraParams = extraParams; - } + public static class Builder { + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String name; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Guest build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Guest( + this.extraParams, this.name); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Paynow build() { - return new PaymentIntentCreateParams.PaymentMethodData.Paynow(this.extraParams); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.LodgingData.Guest#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paynow#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.LodgingData.Guest#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paynow#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. Guest's full name. */ + public Builder setName(String name) { + this.name = name; + return this; } - this.extraParams.putAll(map); - return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Paypal { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Host { + /** Address of the host. */ + @SerializedName("address") + Address address; - private Paypal(Map extraParams) { - this.extraParams = extraParams; - } + /** Host's country of domicile. */ + @SerializedName("country_of_domicile") + String countryOfDomicile; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** Reference number for the host. */ + @SerializedName("host_reference") + String hostReference; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Paypal build() { - return new PaymentIntentCreateParams.PaymentMethodData.Paypal(this.extraParams); - } + /** Type of host. */ + @SerializedName("host_type") + HostType hostType; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypal#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + /** Name of the lodging property or host. */ + @SerializedName("name") + String name; + + /** Total number of reservations for the host. */ + @SerializedName("number_of_reservations") + Long numberOfReservations; + + /** Property phone number. */ + @SerializedName("property_phone_number") + String propertyPhoneNumber; + + /** Host's registration date. */ + @SerializedName("registered_at") + Long registeredAt; + + private Host( + Address address, + String countryOfDomicile, + Map extraParams, + String hostReference, + HostType hostType, + String name, + Long numberOfReservations, + String propertyPhoneNumber, + Long registeredAt) { + this.address = address; + this.countryOfDomicile = countryOfDomicile; + this.extraParams = extraParams; + this.hostReference = hostReference; + this.hostType = hostType; + this.name = name; + this.numberOfReservations = numberOfReservations; + this.propertyPhoneNumber = propertyPhoneNumber; + this.registeredAt = registeredAt; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypal#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Paypay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Address address; - private Paypay(Map extraParams) { - this.extraParams = extraParams; - } + private String countryOfDomicile; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + private String hostReference; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Paypay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Paypay(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 PaymentIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + private HostType hostType; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Payto { - /** The account number for the bank account. */ - @SerializedName("account_number") - String accountNumber; + private String name; - /** Bank-State-Branch number of the bank account. */ - @SerializedName("bsb_number") - String bsbNumber; + private Long numberOfReservations; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 String propertyPhoneNumber; - /** The PayID alias for the bank account. */ - @SerializedName("pay_id") - String payId; + private Long registeredAt; - private Payto( - String accountNumber, String bsbNumber, Map extraParams, String payId) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; - this.extraParams = extraParams; - this.payId = payId; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Host build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Host( + this.address, + this.countryOfDomicile, + this.extraParams, + this.hostReference, + this.hostType, + this.name, + this.numberOfReservations, + this.propertyPhoneNumber, + this.registeredAt); + } - public static Builder builder() { - return new Builder(); - } + /** Address of the host. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Host.Address address) { + this.address = address; + return this; + } - public static class Builder { - private String accountNumber; + /** Host's country of domicile. */ + public Builder setCountryOfDomicile(String countryOfDomicile) { + this.countryOfDomicile = countryOfDomicile; + return this; + } - private String bsbNumber; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.LodgingData.Host#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Map extraParams; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.LodgingData.Host#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private String payId; + /** Reference number for the host. */ + public Builder setHostReference(String hostReference) { + this.hostReference = hostReference; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Payto build() { - return new PaymentIntentCreateParams.PaymentMethodData.Payto( - this.accountNumber, this.bsbNumber, this.extraParams, this.payId); - } + /** Type of host. */ + public Builder setHostType( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Host.HostType hostType) { + this.hostType = hostType; + return this; + } - /** The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** Name of the lodging property or host. */ + public Builder setName(String name) { + this.name = name; + return this; + } - /** Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - return this; - } + /** Total number of reservations for the host. */ + public Builder setNumberOfReservations(Long numberOfReservations) { + this.numberOfReservations = numberOfReservations; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payto#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Property phone number. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payto#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Host's registration date. */ + public Builder setRegisteredAt(Long registeredAt) { + this.registeredAt = registeredAt; + return this; } - this.extraParams.putAll(map); - return this; } - /** The PayID alias for the bank account. */ - public Builder setPayId(String payId) { - this.payId = payId; - return this; - } - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + String city; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Pix { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; - private Pix(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; - public static class Builder { - private Map extraParams; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Pix build() { - return new PaymentIntentCreateParams.PaymentMethodData.Pix(this.extraParams); - } + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Pix#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** 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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Pix#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Promptpay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private String city; - private Promptpay(Map extraParams) { - this.extraParams = extraParams; - } + private String country; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + private String line1; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Promptpay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Promptpay(this.extraParams); - } + private String line2; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Promptpay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private String postalCode; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Promptpay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + private String state; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Qris { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Host.Address build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Host.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - private Qris(Map extraParams) { - this.extraParams = extraParams; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - public static class Builder { - private Map 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 + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Host.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Qris build() { - return new PaymentIntentCreateParams.PaymentMethodData.Qris(this.extraParams); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Host.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; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Qris#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Required. 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; + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Qris#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum HostType implements ApiRequestParams.EnumParam { + @SerializedName("hostel") + HOSTEL("hostel"), + + @SerializedName("hotel") + HOTEL("hotel"), + + @SerializedName("owner") + OWNER("owner"), + + @SerializedName("rental_agency") + RENTAL_AGENCY("rental_agency"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + HostType(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class RadarOptions { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - /** - * A Radar Session is a snapshot of - * the browser metadata and device details that help Radar make more accurate predictions on - * your payments. - */ - @SerializedName("session") - String session; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Price of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; - private RadarOptions(Map extraParams, String session) { - this.extraParams = extraParams; - this.session = session; - } + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - private String session; + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.RadarOptions build() { - return new PaymentIntentCreateParams.PaymentMethodData.RadarOptions( - this.extraParams, this.session); + private Insurance( + Long amount, + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.RadarOptions#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + public static Builder builder() { + return new Builder(); } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.RadarOptions#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + public static class Builder { + private Long amount; - /** - * A Radar Session is a snapshot - * of the browser metadata and device details that help Radar make more accurate predictions - * on your payments. - */ - public Builder setSession(String session) { - this.session = session; - return this; - } - } - } + private String currency; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Rechnung { - /** Required. Customer's date of birth */ - @SerializedName("dob") - Dob dob; + private Map extraParams; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private String insuranceCompanyName; - private Rechnung(Dob dob, Map extraParams) { - this.dob = dob; - this.extraParams = extraParams; - } + private InsuranceType insuranceType; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Insurance build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } - public static class Builder { - private Dob dob; + /** Required. Price of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - private Map extraParams; + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Rechnung build() { - return new PaymentIntentCreateParams.PaymentMethodData.Rechnung( - this.dob, 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 + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Required. Customer's date of birth */ - public Builder setDob(PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob dob) { - this.dob = dob; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Rechnung#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Rechnung#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Dob { - /** Required. The day of birth, between 1 and 31. */ - @SerializedName("day") - Long day; + public static class Total { + /** Required. Total price of the lodging reservation in cents. */ + @SerializedName("amount") + Long amount; + + /** Cash advances in cents. */ + @SerializedName("cash_advances") + Long cashAdvances; + + /** Currency of the total amount. */ + @SerializedName("currency") + String currency; + + /** Discount details for the lodging. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the lodging. */ + @SerializedName("extra_charges") + List extraCharges; /** * Map of extra parameters for custom features not available in this client library. The @@ -12847,19 +12779,32 @@ public static class Dob { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The month of birth, between 1 and 12. */ - @SerializedName("month") - Long month; + /** Prepaid amount in cents. */ + @SerializedName("prepaid_amount") + Long prepaidAmount; - /** Required. The four-digit year of birth. */ - @SerializedName("year") - Long year; + /** Tax breakdown for the lodging reservation. */ + @SerializedName("tax") + Tax tax; - private Dob(Long day, Map extraParams, Long month, Long year) { - this.day = day; + private Total( + Long amount, + Long cashAdvances, + String currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Long prepaidAmount, + Tax tax) { + this.amount = amount; + this.cashAdvances = cashAdvances; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.month = month; - this.year = year; + this.prepaidAmount = prepaidAmount; + this.tax = tax; } public static Builder builder() { @@ -12867,30 +12812,96 @@ public static Builder builder() { } public static class Builder { - private Long day; + private Long amount; + + private Long cashAdvances; + + private String currency; + + private Discounts discounts; + + private List + extraCharges; private Map extraParams; - private Long month; + private Long prepaidAmount; - private Long year; + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob build() { - return new PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob( - this.day, this.extraParams, this.month, this.year); + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total( + this.amount, + this.cashAdvances, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.prepaidAmount, + this.tax); } - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; + /** Required. Total price of the lodging reservation in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Cash advances in cents. */ + public Builder setCashAdvances(Long cashAdvances) { + this.cashAdvances = cashAdvances; + return this; + } + + /** Currency of the total amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Discount details for the lodging. */ + public Builder setDiscounts( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.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 PaymentIntentCreateParams.PaymentDetails.LodgingData.Total#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 PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob#extraParams} + * map. See {@link PaymentIntentCreateParams.PaymentDetails.LodgingData.Total#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12904,7 +12915,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob#extraParams} + * map. See {@link PaymentIntentCreateParams.PaymentDetails.LodgingData.Total#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12915,270 +12926,462 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; + /** Prepaid amount in cents. */ + public Builder setPrepaidAmount(Long prepaidAmount) { + this.prepaidAmount = prepaidAmount; return this; } - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; + /** Tax breakdown for the lodging reservation. */ + public Builder setTax( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax tax) { + this.tax = tax; return this; } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class RevolutPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; - private RevolutPay(Map extraParams) { - this.extraParams = extraParams; - } + /** Coupon code. */ + @SerializedName("coupon") + String coupon; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + private Discounts( + String corporateClientCode, String coupon, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.RevolutPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.RevolutPay(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.RevolutPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.RevolutPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + public static class Builder { + private String corporateClientCode; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class SamsungPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private String coupon; - private SamsungPay(Map extraParams) { - this.extraParams = extraParams; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Discounts build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Discounts( + this.corporateClientCode, this.coupon, this.extraParams); + } - public static class Builder { - private Map extraParams; + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.SamsungPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.SamsungPay(this.extraParams); - } + /** Coupon code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SamsungPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SamsungPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 extra charge. */ + @SerializedName("type") + Type type; + + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Satispay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - private Satispay(Map extraParams) { - this.extraParams = extraParams; - } + public static class Builder { + private Long amount; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + private Type type; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Satispay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Satispay(this.extraParams); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.ExtraCharge build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Satispay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Satispay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.ExtraCharge#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 extra charge. */ + public Builder setType( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class SepaDebit { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("gift_shop") + GIFT_SHOP("gift_shop"), - /** Required. IBAN of the bank account. */ - @SerializedName("iban") - String iban; + @SerializedName("laundry") + LAUNDRY("laundry"), - private SepaDebit(Map extraParams, String iban) { - this.extraParams = extraParams; - this.iban = iban; - } + @SerializedName("mini_bar") + MINI_BAR("mini_bar"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("other") + OTHER("other"), - public static class Builder { - private Map extraParams; + @SerializedName("phone") + PHONE("phone"), - private String iban; + @SerializedName("restaurant") + RESTAURANT("restaurant"); - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.SepaDebit build() { - return new PaymentIntentCreateParams.PaymentMethodData.SepaDebit( - this.extraParams, this.iban); - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SepaDebit#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + Type(String value) { + this.value = value; + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SepaDebit#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; + + /** Tax details. */ + @SerializedName("taxes") + List taxes; + + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; } - this.extraParams.putAll(map); - return this; - } - /** Required. IBAN of the bank account. */ - public Builder setIban(String iban) { - this.iban = iban; - return this; + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean taxExemptIndicator; + + private List taxes; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.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 + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.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; + } + + /** Indicates whether the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } + + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } + + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount in cents. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + String type; + + private Tax(Long amount, Map extraParams, Long rate, String type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.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 + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.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; + } + + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Shopeepay { + 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. @@ -13188,8 +13391,32 @@ public static class Shopeepay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Shopeepay(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() { @@ -13197,97 +13424,63 @@ public static Builder builder() { } public static class Builder { + private Affiliate affiliate; + + private Boolean autoRenewal; + + private BillingInterval billingInterval; + + private Long endsAt; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Shopeepay build() { - return new PaymentIntentCreateParams.PaymentMethodData.Shopeepay(this.extraParams); - } + private String 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 PaymentIntentCreateParams.PaymentMethodData.Shopeepay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + private Long startsAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Subscription build() { + return new PaymentIntentCreateParams.PaymentDetails.Subscription( + this.affiliate, + this.autoRenewal, + this.billingInterval, + this.endsAt, + this.extraParams, + this.name, + this.startsAt); } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Shopeepay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Sofort { - /** - * Required. Two-letter ISO code representing the country the bank account is - * located in. - */ - @SerializedName("country") - Country country; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Sofort(Country country, Map extraParams) { - this.country = country; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Country country; - private Map extraParams; + /** Info whether the subscription will be auto renewed upon expiry. */ + public Builder setAutoRenewal(Boolean autoRenewal) { + this.autoRenewal = autoRenewal; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Sofort build() { - return new PaymentIntentCreateParams.PaymentMethodData.Sofort( - this.country, this.extraParams); + /** Subscription billing details for this purchase. */ + public Builder setBillingInterval( + PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval billingInterval) { + this.billingInterval = billingInterval; + return this; } - /** - * Required. Two-letter ISO code representing the country the bank account - * is located in. - */ - public Builder setCountry( - PaymentIntentCreateParams.PaymentMethodData.Sofort.Country country) { - this.country = country; + /** 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 PaymentIntentCreateParams.PaymentMethodData.Sofort#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentDetails.Subscription#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -13300,8 +13493,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Sofort#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentDetails.Subscription#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -13310,1432 +13503,945 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - - public enum Country implements ApiRequestParams.EnumParam { - @SerializedName("AT") - AT("AT"), - - @SerializedName("BE") - BE("BE"), - - @SerializedName("DE") - DE("DE"), - - @SerializedName("ES") - ES("ES"), - - @SerializedName("IT") - IT("IT"), - - @SerializedName("NL") - NL("NL"); - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Required. Name of the product on subscription. e.g. Apple Music + * Subscription + */ + public Builder setName(String name) { + this.name = name; + return this; + } - Country(String value) { - this.value = value; + /** Subscription start time. Measured in seconds since the Unix epoch. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; } } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class StripeBalance { - /** The connected account ID whose Stripe balance to use as the source of payment. */ - @SerializedName("account") - String account; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * The source_type - * of the balance - */ - @SerializedName("source_type") - SourceType sourceType; + /** Required. The name of the affiliate that originated the purchase. */ + @SerializedName("name") + String name; - private StripeBalance( - String account, Map extraParams, SourceType sourceType) { - this.account = account; - this.extraParams = extraParams; - this.sourceType = sourceType; - } + private Affiliate(Map extraParams, String name) { + this.extraParams = extraParams; + this.name = name; + } - public static Builder builder() { - return new Builder(); - } + public static Builder builder() { + return new Builder(); + } - public static class Builder { - private String account; + public static class Builder { + private Map extraParams; - private Map extraParams; + private String name; - private SourceType sourceType; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate build() { + return new PaymentIntentCreateParams.PaymentDetails.Subscription.Affiliate( + this.extraParams, this.name); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.StripeBalance build() { - return new PaymentIntentCreateParams.PaymentMethodData.StripeBalance( - this.account, this.extraParams, this.sourceType); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.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; + } - /** The connected account ID whose Stripe balance to use as the source of payment. */ - public Builder setAccount(String account) { - this.account = account; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.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; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.StripeBalance#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + return this; } - this.extraParams.put(key, value); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingInterval { /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.StripeBalance#extraParams} - * for the field documentation. + * 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 putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("count") + Long count; /** - * The source_type - * of the balance + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder setSourceType( - PaymentIntentCreateParams.PaymentMethodData.StripeBalance.SourceType sourceType) { - this.sourceType = sourceType; - return this; - } - } - - public enum SourceType implements ApiRequestParams.EnumParam { - @SerializedName("bank_account") - BANK_ACCOUNT("bank_account"), - - @SerializedName("card") - CARD("card"), + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("fpx") - FPX("fpx"); + /** + * Required. Specifies a type of interval unit. Either {@code day}, {@code + * week}, {@code month} or {@code year}. + */ + @SerializedName("interval") + Interval interval; - @Getter(onMethod_ = {@Override}) - private final String value; + private BillingInterval(Long count, Map extraParams, Interval interval) { + this.count = count; + this.extraParams = extraParams; + this.interval = interval; + } - SourceType(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Swish { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Long count; - private Swish(Map extraParams) { - this.extraParams = extraParams; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private Interval interval; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval build() { + return new PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval( + this.count, this.extraParams, this.interval); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Swish build() { - return new PaymentIntentCreateParams.PaymentMethodData.Swish(this.extraParams); - } + /** + * 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 PaymentIntentCreateParams.PaymentMethodData.Swish#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.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; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Swish#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.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; } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Twint { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Required. Specifies a type of interval unit. Either {@code day}, + * {@code week}, {@code month} or {@code year}. + */ + public Builder setInterval( + PaymentIntentCreateParams.PaymentDetails.Subscription.BillingInterval.Interval + interval) { + this.interval = interval; + return this; + } + } - private Twint(Map extraParams) { - this.extraParams = extraParams; - } + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("month") + MONTH("month"), - public static class Builder { - private Map extraParams; + @SerializedName("week") + WEEK("week"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Twint build() { - return new PaymentIntentCreateParams.PaymentMethodData.Twint(this.extraParams); - } + @SerializedName("year") + YEAR("year"); - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Twint#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Twint#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + Interval(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class UsBankAccount { - /** Account holder type: individual or company. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** Account number of the bank account. */ - @SerializedName("account_number") - String accountNumber; + /** + * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm + * payment method. + */ + @SerializedName("affirm") + Affirm affirm; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - @SerializedName("account_type") - AccountType accountType; + /** + * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the + * AfterpayClearpay payment method. + */ + @SerializedName("afterpay_clearpay") + AfterpayClearpay 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; + /** + * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay + * payment method. + */ + @SerializedName("alipay") + Alipay alipay; - /** The ID of a Financial Connections Account to use as a payment method. */ - @SerializedName("financial_connections_account") - String financialConnectionsAccount; + /** + * 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; - /** Routing number of the bank account. */ - @SerializedName("routing_number") - String routingNumber; + /** + * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + */ + @SerializedName("alma") + Alma alma; - private UsBankAccount( - AccountHolderType accountHolderType, - String accountNumber, - AccountType accountType, - Map extraParams, - String financialConnectionsAccount, - String routingNumber) { - this.accountHolderType = accountHolderType; - this.accountNumber = accountNumber; - this.accountType = accountType; - this.extraParams = extraParams; - this.financialConnectionsAccount = financialConnectionsAccount; - this.routingNumber = routingNumber; - } + /** + * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment + * method. + */ + @SerializedName("amazon_pay") + AmazonPay amazonPay; - public static Builder builder() { - return new Builder(); - } + /** + * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank + * account. + */ + @SerializedName("au_becs_debit") + AuBecsDebit auBecsDebit; - public static class Builder { - private AccountHolderType accountHolderType; + /** + * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs + * Direct Debit bank account. + */ + @SerializedName("bacs_debit") + BacsDebit bacsDebit; - private String accountNumber; + /** + * If this is a {@code bancontact} PaymentMethod, this hash contains details about the + * Bancontact payment method. + */ + @SerializedName("bancontact") + Bancontact bancontact; - private AccountType accountType; + /** + * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie + * payment method. + */ + @SerializedName("billie") + Billie billie; - private Map extraParams; + /** + * Billing information associated with the PaymentMethod that may be used or required by + * particular types of payment methods. + */ + @SerializedName("billing_details") + BillingDetails billingDetails; - private String financialConnectionsAccount; + /** + * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment + * method. + */ + @SerializedName("blik") + Blik blik; - private String routingNumber; + /** + * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto + * payment method. + */ + @SerializedName("boleto") + Boleto boleto; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.UsBankAccount build() { - return new PaymentIntentCreateParams.PaymentMethodData.UsBankAccount( - this.accountHolderType, - this.accountNumber, - this.accountType, - this.extraParams, - this.financialConnectionsAccount, - this.routingNumber); - } + /** + * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay + * payment method. + */ + @SerializedName("cashapp") + Cashapp cashapp; - /** Account holder type: individual or company. */ - public Builder setAccountHolderType( - PaymentIntentCreateParams.PaymentMethodData.UsBankAccount.AccountHolderType - accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; - /** Account number of the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + /** + * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the + * CustomerBalance payment method. + */ + @SerializedName("customer_balance") + CustomerBalance customerBalance; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - public Builder setAccountType( - PaymentIntentCreateParams.PaymentMethodData.UsBankAccount.AccountType accountType) { - this.accountType = accountType; - return this; - } + /** + * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment + * method. + */ + @SerializedName("eps") + Eps eps; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.UsBankAccount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.UsBankAccount#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment + * method. + */ + @SerializedName("fpx") + Fpx fpx; - /** The ID of a Financial Connections Account to use as a payment method. */ - public Builder setFinancialConnectionsAccount(String financialConnectionsAccount) { - this.financialConnectionsAccount = financialConnectionsAccount; - return this; - } + /** + * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay + * payment method. + */ + @SerializedName("giropay") + Giropay giropay; - /** Routing number of the bank account. */ - public Builder setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - return this; - } - } + /** + * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + */ + @SerializedName("gopay") + Gopay gopay; - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + /** + * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay + * payment method. + */ + @SerializedName("grabpay") + Grabpay grabpay; - @SerializedName("individual") - INDIVIDUAL("individual"); + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment + * method. + */ + @SerializedName("ideal") + Ideal ideal; - AccountHolderType(String value) { - this.value = value; - } - } + /** + * If this is an {@code interac_present} PaymentMethod, this hash contains details about the + * Interac Present payment method. + */ + @SerializedName("interac_present") + InteracPresent interacPresent; - public enum AccountType implements ApiRequestParams.EnumParam { - @SerializedName("checking") - CHECKING("checking"), + /** + * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao Pay + * payment method. + */ + @SerializedName("kakao_pay") + KakaoPay kakaoPay; - @SerializedName("savings") - SAVINGS("savings"); + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method. + */ + @SerializedName("klarna") + Klarna klarna; - @Getter(onMethod_ = {@Override}) - private final String value; - - AccountType(String value) { - this.value = value; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class WechatPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini + * payment method. + */ + @SerializedName("konbini") + Konbini konbini; - private WechatPay(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean Card + * payment method. + */ + @SerializedName("kr_card") + KrCard krCard; - public static Builder builder() { - return new Builder(); - } + /** + * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment + * method. + */ + @SerializedName("link") + Link link; - public static class Builder { - private Map extraParams; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.WechatPay build() { - return new PaymentIntentCreateParams.PaymentMethodData.WechatPay(this.extraParams); - } + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Map metadata; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.WechatPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the MobilePay + * payment method. + */ + @SerializedName("mobilepay") + Mobilepay mobilepay; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.WechatPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + /** + * If this is a {@code multibanco} PaymentMethod, this hash contains details about the + * Multibanco payment method. + */ + @SerializedName("multibanco") + Multibanco multibanco; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Zip { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver Pay + * payment method. + */ + @SerializedName("naver_pay") + NaverPay naverPay; - private Zip(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is an nz_bank_account PaymentMethod, this hash contains details about the + * nz_bank_account payment method. + */ + @SerializedName("nz_bank_account") + NzBankAccount nzBankAccount; - public static Builder builder() { - return new Builder(); - } + /** + * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment + * method. + */ + @SerializedName("oxxo") + Oxxo oxxo; - public static class Builder { - private Map extraParams; + /** + * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment + * method. + */ + @SerializedName("p24") + P24 p24; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Zip build() { - return new PaymentIntentCreateParams.PaymentMethodData.Zip(this.extraParams); - } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Zip#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment + * method. + */ + @SerializedName("payco") + Payco payco; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Zip#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + /** + * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow + * payment method. + */ + @SerializedName("paynow") + Paynow paynow; - public enum AllowRedisplay implements ApiRequestParams.EnumParam { - @SerializedName("always") - ALWAYS("always"), + /** + * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal + * payment method. + */ + @SerializedName("paypal") + Paypal paypal; - @SerializedName("limited") - LIMITED("limited"), + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; - @SerializedName("unspecified") - UNSPECIFIED("unspecified"); + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. + */ + @SerializedName("pix") + Pix pix; - AllowRedisplay(String value) { - this.value = value; - } - } + /** + * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay + * payment method. + */ + @SerializedName("promptpay") + Promptpay promptpay; - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("acss_debit") - ACSS_DEBIT("acss_debit"), + /** + * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment + * method. + */ + @SerializedName("qris") + Qris qris; - @SerializedName("affirm") - AFFIRM("affirm"), + /** + * Options to configure Radar. See Radar + * Session for more information. + */ + @SerializedName("radar_options") + RadarOptions radarOptions; - @SerializedName("afterpay_clearpay") - AFTERPAY_CLEARPAY("afterpay_clearpay"), - - @SerializedName("alipay") - ALIPAY("alipay"), - - @SerializedName("alma") - ALMA("alma"), - - @SerializedName("amazon_pay") - AMAZON_PAY("amazon_pay"), - - @SerializedName("au_becs_debit") - AU_BECS_DEBIT("au_becs_debit"), - - @SerializedName("bacs_debit") - BACS_DEBIT("bacs_debit"), - - @SerializedName("bancontact") - BANCONTACT("bancontact"), - - @SerializedName("billie") - BILLIE("billie"), - - @SerializedName("blik") - BLIK("blik"), - - @SerializedName("boleto") - BOLETO("boleto"), - - @SerializedName("cashapp") - CASHAPP("cashapp"), - - @SerializedName("crypto") - CRYPTO("crypto"), - - @SerializedName("customer_balance") - CUSTOMER_BALANCE("customer_balance"), - - @SerializedName("eps") - EPS("eps"), - - @SerializedName("fpx") - FPX("fpx"), - - @SerializedName("giropay") - GIROPAY("giropay"), - - @SerializedName("gopay") - GOPAY("gopay"), - - @SerializedName("grabpay") - GRABPAY("grabpay"), - - @SerializedName("id_bank_transfer") - ID_BANK_TRANSFER("id_bank_transfer"), - - @SerializedName("ideal") - IDEAL("ideal"), - - @SerializedName("kakao_pay") - KAKAO_PAY("kakao_pay"), - - @SerializedName("klarna") - KLARNA("klarna"), - - @SerializedName("konbini") - KONBINI("konbini"), - - @SerializedName("kr_card") - KR_CARD("kr_card"), - - @SerializedName("link") - LINK("link"), - - @SerializedName("mb_way") - MB_WAY("mb_way"), - - @SerializedName("mobilepay") - MOBILEPAY("mobilepay"), - - @SerializedName("multibanco") - MULTIBANCO("multibanco"), - - @SerializedName("naver_pay") - NAVER_PAY("naver_pay"), - - @SerializedName("nz_bank_account") - NZ_BANK_ACCOUNT("nz_bank_account"), - - @SerializedName("oxxo") - OXXO("oxxo"), - - @SerializedName("p24") - P24("p24"), - - @SerializedName("pay_by_bank") - PAY_BY_BANK("pay_by_bank"), - - @SerializedName("payco") - PAYCO("payco"), - - @SerializedName("paynow") - PAYNOW("paynow"), - - @SerializedName("paypal") - PAYPAL("paypal"), - - @SerializedName("paypay") - PAYPAY("paypay"), - - @SerializedName("payto") - PAYTO("payto"), - - @SerializedName("pix") - PIX("pix"), - - @SerializedName("promptpay") - PROMPTPAY("promptpay"), - - @SerializedName("qris") - QRIS("qris"), - - @SerializedName("rechnung") - RECHNUNG("rechnung"), - - @SerializedName("revolut_pay") - REVOLUT_PAY("revolut_pay"), - - @SerializedName("samsung_pay") - SAMSUNG_PAY("samsung_pay"), - - @SerializedName("satispay") - SATISPAY("satispay"), - - @SerializedName("sepa_debit") - SEPA_DEBIT("sepa_debit"), - - @SerializedName("shopeepay") - SHOPEEPAY("shopeepay"), - - @SerializedName("sofort") - SOFORT("sofort"), - - @SerializedName("stripe_balance") - STRIPE_BALANCE("stripe_balance"), - - @SerializedName("swish") - SWISH("swish"), - - @SerializedName("twint") - TWINT("twint"), - - @SerializedName("us_bank_account") - US_BANK_ACCOUNT("us_bank_account"), - - @SerializedName("wechat_pay") - WECHAT_PAY("wechat_pay"), - - @SerializedName("zip") - ZIP("zip"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - Type(String value) { - this.value = value; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PaymentMethodOptions { /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the ACSS - * Debit payment method options. + * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung + * payment method. */ - @SerializedName("acss_debit") - Object acssDebit; + @SerializedName("rechnung") + Rechnung rechnung; /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. + * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the Revolut + * Pay payment method. */ - @SerializedName("affirm") - Object affirm; + @SerializedName("revolut_pay") + RevolutPay revolutPay; /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. + * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the + * SamsungPay payment method. */ - @SerializedName("afterpay_clearpay") - Object afterpayClearpay; + @SerializedName("samsung_pay") + SamsungPay samsungPay; /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. + * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay + * payment method. */ - @SerializedName("alipay") - Object alipay; + @SerializedName("satispay") + Satispay satispay; /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. + * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA + * debit bank account. */ - @SerializedName("alma") - Object alma; + @SerializedName("sepa_debit") + SepaDebit sepaDebit; /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. + * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment + * method. */ - @SerializedName("amazon_pay") - Object amazonPay; + @SerializedName("shopeepay") + Shopeepay shopeepay; /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the AU - * BECS Direct Debit payment method options. + * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT + * payment method. */ - @SerializedName("au_becs_debit") - Object auBecsDebit; + @SerializedName("sofort") + Sofort sofort; - /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the BACS - * Debit payment method options. - */ - @SerializedName("bacs_debit") - Object bacsDebit; + /** This hash contains details about the Stripe balance payment method. */ + @SerializedName("stripe_balance") + StripeBalance stripeBalance; /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. + * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment + * method. */ - @SerializedName("bancontact") - Object bancontact; + @SerializedName("swish") + Swish swish; /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. + * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. */ - @SerializedName("billie") - Object billie; + @SerializedName("twint") + Twint twint; /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. + * 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("blik") - Object blik; + @SerializedName("type") + Type type; /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. + * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US + * bank account payment method. */ - @SerializedName("boleto") - Object boleto; - - /** Configuration for any card payments attempted on this PaymentIntent. */ - @SerializedName("card") - Object card; + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. + * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the + * wechat_pay payment method. */ - @SerializedName("card_present") - Object cardPresent; + @SerializedName("wechat_pay") + WechatPay wechatPay; /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App - * Pay payment method options. + * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment + * method. */ - @SerializedName("cashapp") - Object cashapp; + @SerializedName("zip") + Zip zip; - /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. - */ - @SerializedName("crypto") - Object crypto; + private PaymentMethodData( + AcssDebit acssDebit, + Affirm affirm, + AfterpayClearpay afterpayClearpay, + Alipay alipay, + AllowRedisplay allowRedisplay, + Alma alma, + AmazonPay amazonPay, + AuBecsDebit auBecsDebit, + BacsDebit bacsDebit, + Bancontact bancontact, + Billie billie, + BillingDetails billingDetails, + Blik blik, + Boleto boleto, + Cashapp cashapp, + Crypto crypto, + CustomerBalance customerBalance, + Eps eps, + Map extraParams, + Fpx fpx, + Giropay giropay, + Gopay gopay, + Grabpay grabpay, + IdBankTransfer idBankTransfer, + Ideal ideal, + InteracPresent interacPresent, + KakaoPay kakaoPay, + Klarna klarna, + Konbini konbini, + KrCard krCard, + Link link, + MbWay mbWay, + Map metadata, + Mobilepay mobilepay, + Multibanco multibanco, + NaverPay naverPay, + NzBankAccount nzBankAccount, + Oxxo oxxo, + P24 p24, + PayByBank payByBank, + Payco payco, + Paynow paynow, + Paypal paypal, + Paypay paypay, + Payto payto, + Pix pix, + Promptpay promptpay, + Qris qris, + RadarOptions radarOptions, + Rechnung rechnung, + RevolutPay revolutPay, + SamsungPay samsungPay, + Satispay satispay, + SepaDebit sepaDebit, + Shopeepay shopeepay, + Sofort sofort, + StripeBalance stripeBalance, + 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.alma = alma; + this.amazonPay = amazonPay; + this.auBecsDebit = auBecsDebit; + this.bacsDebit = bacsDebit; + this.bancontact = bancontact; + this.billie = billie; + this.billingDetails = billingDetails; + this.blik = blik; + this.boleto = boleto; + this.cashapp = cashapp; + this.crypto = crypto; + this.customerBalance = customerBalance; + this.eps = eps; + this.extraParams = extraParams; + this.fpx = fpx; + this.giropay = giropay; + this.gopay = gopay; + this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; + this.ideal = ideal; + this.interacPresent = interacPresent; + this.kakaoPay = kakaoPay; + this.klarna = klarna; + this.konbini = konbini; + this.krCard = krCard; + this.link = link; + this.mbWay = mbWay; + this.metadata = metadata; + this.mobilepay = mobilepay; + this.multibanco = multibanco; + this.naverPay = naverPay; + this.nzBankAccount = nzBankAccount; + this.oxxo = oxxo; + this.p24 = p24; + this.payByBank = payByBank; + this.payco = payco; + this.paynow = paynow; + this.paypal = paypal; + this.paypay = paypay; + this.payto = payto; + this.pix = pix; + this.promptpay = promptpay; + this.qris = qris; + this.radarOptions = radarOptions; + this.rechnung = rechnung; + this.revolutPay = revolutPay; + this.samsungPay = samsungPay; + this.satispay = satispay; + this.sepaDebit = sepaDebit; + this.shopeepay = shopeepay; + this.sofort = sofort; + this.stripeBalance = stripeBalance; + this.swish = swish; + this.twint = twint; + this.type = type; + this.usBankAccount = usBankAccount; + this.wechatPay = wechatPay; + this.zip = zip; + } - /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the - * customer balance payment method options. - */ - @SerializedName("customer_balance") - Object customerBalance; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS payment - * method options. - */ - @SerializedName("eps") - Object eps; + public static class Builder { + private AcssDebit acssDebit; - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Affirm affirm; - /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment - * method options. - */ - @SerializedName("fpx") - Object fpx; + private AfterpayClearpay afterpayClearpay; - /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay - * payment method options. - */ - @SerializedName("giropay") - Object giropay; + private Alipay alipay; - /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. - */ - @SerializedName("gopay") - Object gopay; + private AllowRedisplay allowRedisplay; - /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay - * payment method options. - */ - @SerializedName("grabpay") - Object grabpay; + private Alma alma; - /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the - * Indonesia Bank Transfer payment method options. - */ - @SerializedName("id_bank_transfer") - Object idBankTransfer; + private AmazonPay amazonPay; - /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. - */ - @SerializedName("ideal") - Object ideal; + private AuBecsDebit auBecsDebit; - /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. - */ - @SerializedName("interac_present") - Object interacPresent; + private BacsDebit bacsDebit; - /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the Kakao - * Pay payment method options. - */ - @SerializedName("kakao_pay") - Object kakaoPay; + private Bancontact bancontact; - /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. - */ - @SerializedName("klarna") - Object klarna; + private Billie billie; - /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini - * payment method options. - */ - @SerializedName("konbini") - Object konbini; + private BillingDetails billingDetails; - /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR Card - * payment method options. - */ - @SerializedName("kr_card") - Object krCard; + private Blik blik; - /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - @SerializedName("link") - Object link; + private Boleto boleto; - /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. - */ - @SerializedName("mb_way") - Object mbWay; + private Cashapp cashapp; - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - @SerializedName("mobilepay") - Object mobilepay; + private Crypto crypto; - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - @SerializedName("multibanco") - Object multibanco; + private CustomerBalance customerBalance; - /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the Naver - * Pay payment method options. - */ - @SerializedName("naver_pay") - Object naverPay; + private Eps eps; - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about the - * NZ BECS Direct Debit payment method options. - */ - @SerializedName("nz_bank_account") - Object nzBankAccount; + private Map extraParams; - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - @SerializedName("oxxo") - Object oxxo; + private Fpx fpx; - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - @SerializedName("p24") - Object p24; + private Giropay giropay; - /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. - */ - @SerializedName("pay_by_bank") - Object payByBank; + private Gopay gopay; - /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - @SerializedName("payco") - Object payco; + private Grabpay grabpay; - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - @SerializedName("paynow") - Object paynow; + private IdBankTransfer idBankTransfer; - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - @SerializedName("paypal") - Object paypal; + private Ideal ideal; - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - @SerializedName("paypay") - Object paypay; + private InteracPresent interacPresent; - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - @SerializedName("payto") - Object payto; + private KakaoPay kakaoPay; - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment - * method options. - */ - @SerializedName("pix") - Object pix; + private Klarna klarna; - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - @SerializedName("promptpay") - Object promptpay; + private Konbini konbini; - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - @SerializedName("qris") - Object qris; + private KrCard krCard; - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - @SerializedName("rechnung") - Object rechnung; + private Link link; - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - @SerializedName("revolut_pay") - Object revolutPay; + private MbWay mbWay; - /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. - */ - @SerializedName("samsung_pay") - Object samsungPay; + private Map metadata; - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - @SerializedName("satispay") - Object satispay; + private Mobilepay mobilepay; - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the SEPA - * Debit payment method options. - */ - @SerializedName("sepa_debit") - Object sepaDebit; + private Multibanco multibanco; - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - @SerializedName("shopeepay") - Object shopeepay; + private NaverPay naverPay; - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - @SerializedName("sofort") - Object sofort; + private NzBankAccount nzBankAccount; - /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. - */ - @SerializedName("stripe_balance") - Object stripeBalance; + private Oxxo oxxo; - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - @SerializedName("swish") - Object swish; + private P24 p24; - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - @SerializedName("twint") - Object twint; + private PayByBank payByBank; - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the - * US bank account payment method options. - */ - @SerializedName("us_bank_account") - Object usBankAccount; + private Payco payco; - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - @SerializedName("wechat_pay") - Object wechatPay; + private Paynow paynow; - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment - * method options. - */ - @SerializedName("zip") - Object zip; + private Paypal paypal; - private PaymentMethodOptions( - Object acssDebit, - Object affirm, - Object afterpayClearpay, - Object alipay, - Object alma, - Object amazonPay, - Object auBecsDebit, - Object bacsDebit, - Object bancontact, - Object billie, - Object blik, - Object boleto, - Object card, - Object cardPresent, - Object cashapp, - Object crypto, - Object customerBalance, - Object eps, - Map extraParams, - Object fpx, - Object giropay, - Object gopay, - Object grabpay, - Object idBankTransfer, - Object ideal, - Object interacPresent, - Object kakaoPay, - Object klarna, - Object konbini, - Object krCard, - Object link, - Object mbWay, - Object mobilepay, - Object multibanco, - Object naverPay, - Object nzBankAccount, - Object oxxo, - Object p24, - Object payByBank, - Object payco, - Object paynow, - Object paypal, - Object paypay, - Object payto, - Object pix, - Object promptpay, - Object qris, - Object rechnung, - Object revolutPay, - Object samsungPay, - Object satispay, - Object sepaDebit, - Object shopeepay, - Object sofort, - Object stripeBalance, - Object swish, - Object twint, - Object usBankAccount, - Object wechatPay, - Object zip) { - this.acssDebit = acssDebit; - this.affirm = affirm; - this.afterpayClearpay = afterpayClearpay; - this.alipay = alipay; - this.alma = alma; - this.amazonPay = amazonPay; - this.auBecsDebit = auBecsDebit; - this.bacsDebit = bacsDebit; - this.bancontact = bancontact; - this.billie = billie; - this.blik = blik; - this.boleto = boleto; - this.card = card; - this.cardPresent = cardPresent; - this.cashapp = cashapp; - this.crypto = crypto; - this.customerBalance = customerBalance; - this.eps = eps; - this.extraParams = extraParams; - this.fpx = fpx; - this.giropay = giropay; - this.gopay = gopay; - this.grabpay = grabpay; - this.idBankTransfer = idBankTransfer; - this.ideal = ideal; - this.interacPresent = interacPresent; - this.kakaoPay = kakaoPay; - this.klarna = klarna; - this.konbini = konbini; - this.krCard = krCard; - this.link = link; - this.mbWay = mbWay; - this.mobilepay = mobilepay; - this.multibanco = multibanco; - this.naverPay = naverPay; - this.nzBankAccount = nzBankAccount; - this.oxxo = oxxo; - this.p24 = p24; - this.payByBank = payByBank; - this.payco = payco; - this.paynow = paynow; - this.paypal = paypal; - this.paypay = paypay; - this.payto = payto; - this.pix = pix; - this.promptpay = promptpay; - this.qris = qris; - this.rechnung = rechnung; - this.revolutPay = revolutPay; - this.samsungPay = samsungPay; - this.satispay = satispay; - this.sepaDebit = sepaDebit; - this.shopeepay = shopeepay; - this.sofort = sofort; - this.stripeBalance = stripeBalance; - this.swish = swish; - this.twint = twint; - this.usBankAccount = usBankAccount; - this.wechatPay = wechatPay; - this.zip = zip; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object acssDebit; - - private Object affirm; - - private Object afterpayClearpay; - - private Object alipay; - - private Object alma; - - private Object amazonPay; - - private Object auBecsDebit; - - private Object bacsDebit; - - private Object bancontact; - - private Object billie; - - private Object blik; - - private Object boleto; - - private Object card; - - private Object cardPresent; - - private Object cashapp; - - private Object crypto; - - private Object customerBalance; - - private Object eps; - - private Map extraParams; - - private Object fpx; - - private Object giropay; - - private Object gopay; - - private Object grabpay; - - private Object idBankTransfer; - - private Object ideal; - - private Object interacPresent; - - private Object kakaoPay; - - private Object klarna; - - private Object konbini; - - private Object krCard; - - private Object link; - - private Object mbWay; - - private Object mobilepay; - - private Object multibanco; - - private Object naverPay; - - private Object nzBankAccount; - - private Object oxxo; - - private Object p24; - - private Object payByBank; - - private Object payco; - - private Object paynow; + private Paypay paypay; - private Object paypal; + private Payto payto; - private Object paypay; + private Pix pix; - private Object payto; + private Promptpay promptpay; - private Object pix; + private Qris qris; - private Object promptpay; + private RadarOptions radarOptions; - private Object qris; + private Rechnung rechnung; - private Object rechnung; + private RevolutPay revolutPay; - private Object revolutPay; + private SamsungPay samsungPay; - private Object samsungPay; + private Satispay satispay; - private Object satispay; + private SepaDebit sepaDebit; - private Object sepaDebit; + private Shopeepay shopeepay; - private Object shopeepay; + private Sofort sofort; - private Object sofort; + private StripeBalance stripeBalance; - private Object stripeBalance; + private Swish swish; - private Object swish; + private Twint twint; - private Object twint; + private Type type; - private Object usBankAccount; + private UsBankAccount usBankAccount; - private Object wechatPay; + private WechatPay wechatPay; - private Object zip; + private Zip zip; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions build() { - return new PaymentIntentCreateParams.PaymentMethodOptions( + public PaymentIntentCreateParams.PaymentMethodData build() { + return new PaymentIntentCreateParams.PaymentMethodData( this.acssDebit, this.affirm, this.afterpayClearpay, this.alipay, + this.allowRedisplay, this.alma, this.amazonPay, this.auBecsDebit, this.bacsDebit, this.bancontact, this.billie, + this.billingDetails, this.blik, this.boleto, - this.card, - this.cardPresent, this.cashapp, this.crypto, this.customerBalance, @@ -14754,6 +14460,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.krCard, this.link, this.mbWay, + this.metadata, this.mobilepay, this.multibanco, this.naverPay, @@ -14769,6 +14476,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.pix, this.promptpay, this.qris, + this.radarOptions, this.rechnung, this.revolutPay, this.samsungPay, @@ -14779,1120 +14487,1114 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.stripeBalance, this.swish, this.twint, + this.type, this.usBankAccount, this.wechatPay, this.zip); } /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the - * ACSS Debit payment method options. + * If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS + * Debit payment method. */ - public Builder setAcssDebit( - PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit acssDebit) { + public Builder setAcssDebit(PaymentIntentCreateParams.PaymentMethodData.AcssDebit acssDebit) { this.acssDebit = acssDebit; return this; } /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the - * ACSS Debit payment method options. + * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm + * payment method. */ - public Builder setAcssDebit(EmptyParam acssDebit) { - this.acssDebit = acssDebit; + public Builder setAffirm(PaymentIntentCreateParams.PaymentMethodData.Affirm affirm) { + this.affirm = affirm; return this; } /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. + * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the + * AfterpayClearpay payment method. */ - public Builder setAffirm(PaymentIntentCreateParams.PaymentMethodOptions.Affirm affirm) { - this.affirm = affirm; + public Builder setAfterpayClearpay( + PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; return this; } /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. - */ - public Builder setAffirm(EmptyParam affirm) { - this.affirm = affirm; + * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay + * payment method. + */ + public Builder setAlipay(PaymentIntentCreateParams.PaymentMethodData.Alipay alipay) { + this.alipay = alipay; return this; } /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. + * 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 setAfterpayClearpay( - PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; + public Builder setAllowRedisplay( + PaymentIntentCreateParams.PaymentMethodData.AllowRedisplay allowRedisplay) { + this.allowRedisplay = allowRedisplay; return this; } /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. + * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. */ - public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; + public Builder setAlma(PaymentIntentCreateParams.PaymentMethodData.Alma alma) { + this.alma = alma; return this; } /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. + * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay + * payment method. */ - public Builder setAlipay(PaymentIntentCreateParams.PaymentMethodOptions.Alipay alipay) { - this.alipay = alipay; + public Builder setAmazonPay(PaymentIntentCreateParams.PaymentMethodData.AmazonPay amazonPay) { + this.amazonPay = amazonPay; return this; } /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. + * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the + * bank account. */ - public Builder setAlipay(EmptyParam alipay) { - this.alipay = alipay; + public Builder setAuBecsDebit( + PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit auBecsDebit) { + this.auBecsDebit = auBecsDebit; return this; } /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. + * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs + * Direct Debit bank account. */ - public Builder setAlma(PaymentIntentCreateParams.PaymentMethodOptions.Alma alma) { - this.alma = alma; + public Builder setBacsDebit(PaymentIntentCreateParams.PaymentMethodData.BacsDebit bacsDebit) { + this.bacsDebit = bacsDebit; return this; } /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. + * If this is a {@code bancontact} PaymentMethod, this hash contains details about the + * Bancontact payment method. */ - public Builder setAlma(EmptyParam alma) { - this.alma = alma; + public Builder setBancontact( + PaymentIntentCreateParams.PaymentMethodData.Bancontact bancontact) { + this.bancontact = bancontact; return this; } /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. + * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie + * payment method. */ - public Builder setAmazonPay( - PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay amazonPay) { - this.amazonPay = amazonPay; + public Builder setBillie(PaymentIntentCreateParams.PaymentMethodData.Billie billie) { + this.billie = billie; return this; } /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. + * Billing information associated with the PaymentMethod that may be used or required by + * particular types of payment methods. */ - public Builder setAmazonPay(EmptyParam amazonPay) { - this.amazonPay = amazonPay; + public Builder setBillingDetails( + PaymentIntentCreateParams.PaymentMethodData.BillingDetails billingDetails) { + this.billingDetails = billingDetails; return this; } /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the - * AU BECS Direct Debit payment method options. + * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment + * method. */ - public Builder setAuBecsDebit( - PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) { - this.auBecsDebit = auBecsDebit; + public Builder setBlik(PaymentIntentCreateParams.PaymentMethodData.Blik blik) { + this.blik = blik; return this; } /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the - * AU BECS Direct Debit payment method options. + * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto + * payment method. */ - public Builder setAuBecsDebit(EmptyParam auBecsDebit) { - this.auBecsDebit = auBecsDebit; + public Builder setBoleto(PaymentIntentCreateParams.PaymentMethodData.Boleto boleto) { + this.boleto = boleto; return this; } /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the - * BACS Debit payment method options. + * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App + * Pay payment method. */ - public Builder setBacsDebit( - PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit bacsDebit) { - this.bacsDebit = bacsDebit; + public Builder setCashapp(PaymentIntentCreateParams.PaymentMethodData.Cashapp cashapp) { + this.cashapp = cashapp; return this; } /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the - * BACS Debit payment method options. + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. */ - public Builder setBacsDebit(EmptyParam bacsDebit) { - this.bacsDebit = bacsDebit; + public Builder setCrypto(PaymentIntentCreateParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; return this; } /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. + * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the + * CustomerBalance payment method. */ - public Builder setBancontact( - PaymentIntentCreateParams.PaymentMethodOptions.Bancontact bancontact) { - this.bancontact = bancontact; + public Builder setCustomerBalance( + PaymentIntentCreateParams.PaymentMethodData.CustomerBalance customerBalance) { + this.customerBalance = customerBalance; return this; } /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. + * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment + * method. */ - public Builder setBancontact(EmptyParam bancontact) { - this.bancontact = bancontact; + public Builder setEps(PaymentIntentCreateParams.PaymentMethodData.Eps eps) { + this.eps = eps; return this; } /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentCreateParams.PaymentMethodData#extraParams} for the field documentation. */ - public Builder setBillie(PaymentIntentCreateParams.PaymentMethodOptions.Billie billie) { - this.billie = billie; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentCreateParams.PaymentMethodData#extraParams} for the field + * documentation. */ - public Builder setBillie(EmptyParam billie) { - this.billie = billie; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. + * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment + * method. */ - public Builder setBlik(PaymentIntentCreateParams.PaymentMethodOptions.Blik blik) { - this.blik = blik; + public Builder setFpx(PaymentIntentCreateParams.PaymentMethodData.Fpx fpx) { + this.fpx = fpx; return this; } /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. + * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay + * payment method. */ - public Builder setBlik(EmptyParam blik) { - this.blik = blik; + public Builder setGiropay(PaymentIntentCreateParams.PaymentMethodData.Giropay giropay) { + this.giropay = giropay; return this; } /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. + * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment + * method. */ - public Builder setBoleto(PaymentIntentCreateParams.PaymentMethodOptions.Boleto boleto) { - this.boleto = boleto; + public Builder setGopay(PaymentIntentCreateParams.PaymentMethodData.Gopay gopay) { + this.gopay = gopay; return this; } /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. + * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay + * payment method. */ - public Builder setBoleto(EmptyParam boleto) { - this.boleto = boleto; + public Builder setGrabpay(PaymentIntentCreateParams.PaymentMethodData.Grabpay grabpay) { + this.grabpay = grabpay; return this; } - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(PaymentIntentCreateParams.PaymentMethodOptions.Card card) { - this.card = card; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; return this; } - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(EmptyParam card) { - this.card = card; + /** + * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL + * payment method. + */ + public Builder setIdeal(PaymentIntentCreateParams.PaymentMethodData.Ideal ideal) { + this.ideal = ideal; return this; } /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. + * If this is an {@code interac_present} PaymentMethod, this hash contains details about the + * Interac Present payment method. */ - public Builder setCardPresent( - PaymentIntentCreateParams.PaymentMethodOptions.CardPresent cardPresent) { - this.cardPresent = cardPresent; + public Builder setInteracPresent( + PaymentIntentCreateParams.PaymentMethodData.InteracPresent interacPresent) { + this.interacPresent = interacPresent; return this; } /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. + * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao + * Pay payment method. */ - public Builder setCardPresent(EmptyParam cardPresent) { - this.cardPresent = cardPresent; + public Builder setKakaoPay(PaymentIntentCreateParams.PaymentMethodData.KakaoPay kakaoPay) { + this.kakaoPay = kakaoPay; return this; } /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash - * App Pay payment method options. + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method. */ - public Builder setCashapp(PaymentIntentCreateParams.PaymentMethodOptions.Cashapp cashapp) { - this.cashapp = cashapp; + public Builder setKlarna(PaymentIntentCreateParams.PaymentMethodData.Klarna klarna) { + this.klarna = klarna; return this; } /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash - * App Pay payment method options. + * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini + * payment method. */ - public Builder setCashapp(EmptyParam cashapp) { - this.cashapp = cashapp; + public Builder setKonbini(PaymentIntentCreateParams.PaymentMethodData.Konbini konbini) { + this.konbini = konbini; return this; } /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. + * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean + * Card payment method. */ - public Builder setCrypto(PaymentIntentCreateParams.PaymentMethodOptions.Crypto crypto) { - this.crypto = crypto; + public Builder setKrCard(PaymentIntentCreateParams.PaymentMethodData.KrCard krCard) { + this.krCard = krCard; return this; } /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. + * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment + * method. */ - public Builder setCrypto(EmptyParam crypto) { - this.crypto = crypto; + public Builder setLink(PaymentIntentCreateParams.PaymentMethodData.Link link) { + this.link = link; return this; } /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about - * the customer balance payment method options. + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. */ - public Builder setCustomerBalance( - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance customerBalance) { - this.customerBalance = customerBalance; + public Builder setMbWay(PaymentIntentCreateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; return this; } /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about - * the customer balance payment method options. + * 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 + * PaymentIntentCreateParams.PaymentMethodData#metadata} for the field documentation. */ - public Builder setCustomerBalance(EmptyParam customerBalance) { - this.customerBalance = customerBalance; + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); return this; } /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS - * payment method options. + * 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 PaymentIntentCreateParams.PaymentMethodData#metadata} for the field + * documentation. */ - public Builder setEps(PaymentIntentCreateParams.PaymentMethodOptions.Eps eps) { - this.eps = eps; + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); return this; } /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS - * payment method options. + * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the + * MobilePay payment method. */ - public Builder setEps(EmptyParam eps) { - this.eps = eps; + public Builder setMobilepay(PaymentIntentCreateParams.PaymentMethodData.Mobilepay mobilepay) { + this.mobilepay = mobilepay; return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions#extraParams} for the field documentation. + * If this is a {@code multibanco} PaymentMethod, this hash contains details about the + * Multibanco payment method. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setMultibanco( + PaymentIntentCreateParams.PaymentMethodData.Multibanco multibanco) { + this.multibanco = multibanco; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentIntentCreateParams.PaymentMethodOptions#extraParams} for the field - * documentation. + * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver + * Pay payment method. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setNaverPay(PaymentIntentCreateParams.PaymentMethodData.NaverPay naverPay) { + this.naverPay = naverPay; return this; } /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX - * payment method options. + * If this is an nz_bank_account PaymentMethod, this hash contains details about the + * nz_bank_account payment method. */ - public Builder setFpx(PaymentIntentCreateParams.PaymentMethodOptions.Fpx fpx) { - this.fpx = fpx; + public Builder setNzBankAccount( + PaymentIntentCreateParams.PaymentMethodData.NzBankAccount nzBankAccount) { + this.nzBankAccount = nzBankAccount; return this; } /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX - * payment method options. + * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment + * method. */ - public Builder setFpx(EmptyParam fpx) { - this.fpx = fpx; + public Builder setOxxo(PaymentIntentCreateParams.PaymentMethodData.Oxxo oxxo) { + this.oxxo = oxxo; return this; } /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the - * Giropay payment method options. + * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment + * method. */ - public Builder setGiropay(PaymentIntentCreateParams.PaymentMethodOptions.Giropay giropay) { - this.giropay = giropay; + public Builder setP24(PaymentIntentCreateParams.PaymentMethodData.P24 p24) { + this.p24 = p24; return this; } /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the - * Giropay payment method options. + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. */ - public Builder setGiropay(EmptyParam giropay) { - this.giropay = giropay; + public Builder setPayByBank(PaymentIntentCreateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; return this; } /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. + * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO + * payment method. */ - public Builder setGopay(PaymentIntentCreateParams.PaymentMethodOptions.Gopay gopay) { - this.gopay = gopay; + public Builder setPayco(PaymentIntentCreateParams.PaymentMethodData.Payco payco) { + this.payco = payco; return this; } /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. + * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow + * payment method. */ - public Builder setGopay(EmptyParam gopay) { - this.gopay = gopay; + public Builder setPaynow(PaymentIntentCreateParams.PaymentMethodData.Paynow paynow) { + this.paynow = paynow; return this; } /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the - * Grabpay payment method options. + * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal + * payment method. */ - public Builder setGrabpay(PaymentIntentCreateParams.PaymentMethodOptions.Grabpay grabpay) { - this.grabpay = grabpay; + public Builder setPaypal(PaymentIntentCreateParams.PaymentMethodData.Paypal paypal) { + this.paypal = paypal; return this; } /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the - * Grabpay payment method options. + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. */ - public Builder setGrabpay(EmptyParam grabpay) { - this.grabpay = grabpay; + public Builder setPaypay(PaymentIntentCreateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; return this; } /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about - * the Indonesia Bank Transfer payment method options. + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. */ - public Builder setIdBankTransfer( - PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { - this.idBankTransfer = idBankTransfer; + public Builder setPayto(PaymentIntentCreateParams.PaymentMethodData.Payto payto) { + this.payto = payto; return this; } /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about - * the Indonesia Bank Transfer payment method options. + * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment + * method. */ - public Builder setIdBankTransfer(EmptyParam idBankTransfer) { - this.idBankTransfer = idBankTransfer; + public Builder setPix(PaymentIntentCreateParams.PaymentMethodData.Pix pix) { + this.pix = pix; return this; } /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. + * If this is a {@code promptpay} PaymentMethod, this hash contains details about the + * PromptPay payment method. */ - public Builder setIdeal(PaymentIntentCreateParams.PaymentMethodOptions.Ideal ideal) { - this.ideal = ideal; + public Builder setPromptpay(PaymentIntentCreateParams.PaymentMethodData.Promptpay promptpay) { + this.promptpay = promptpay; return this; } /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. + * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment + * method. */ - public Builder setIdeal(EmptyParam ideal) { - this.ideal = ideal; + public Builder setQris(PaymentIntentCreateParams.PaymentMethodData.Qris qris) { + this.qris = qris; return this; } /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about - * the Card Present payment method options. + * Options to configure Radar. See Radar + * Session for more information. */ - public Builder setInteracPresent( - PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent interacPresent) { - this.interacPresent = interacPresent; + public Builder setRadarOptions( + PaymentIntentCreateParams.PaymentMethodData.RadarOptions radarOptions) { + this.radarOptions = radarOptions; return this; } /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about - * the Card Present payment method options. + * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung + * payment method. */ - public Builder setInteracPresent(EmptyParam interacPresent) { - this.interacPresent = interacPresent; + public Builder setRechnung(PaymentIntentCreateParams.PaymentMethodData.Rechnung rechnung) { + this.rechnung = rechnung; return this; } /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the - * Kakao Pay payment method options. + * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the + * Revolut Pay payment method. */ - public Builder setKakaoPay(PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay kakaoPay) { - this.kakaoPay = kakaoPay; + public Builder setRevolutPay( + PaymentIntentCreateParams.PaymentMethodData.RevolutPay revolutPay) { + this.revolutPay = revolutPay; return this; } /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the - * Kakao Pay payment method options. + * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the + * SamsungPay payment method. */ - public Builder setKakaoPay(EmptyParam kakaoPay) { - this.kakaoPay = kakaoPay; + public Builder setSamsungPay( + PaymentIntentCreateParams.PaymentMethodData.SamsungPay samsungPay) { + this.samsungPay = samsungPay; return this; } /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. + * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay + * payment method. */ - public Builder setKlarna(PaymentIntentCreateParams.PaymentMethodOptions.Klarna klarna) { - this.klarna = klarna; + public Builder setSatispay(PaymentIntentCreateParams.PaymentMethodData.Satispay satispay) { + this.satispay = satispay; return this; } /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. + * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA + * debit bank account. */ - public Builder setKlarna(EmptyParam klarna) { - this.klarna = klarna; + public Builder setSepaDebit(PaymentIntentCreateParams.PaymentMethodData.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; return this; } /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the - * Konbini payment method options. + * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay + * payment method. */ - public Builder setKonbini(PaymentIntentCreateParams.PaymentMethodOptions.Konbini konbini) { - this.konbini = konbini; + public Builder setShopeepay(PaymentIntentCreateParams.PaymentMethodData.Shopeepay shopeepay) { + this.shopeepay = shopeepay; return this; } /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the - * Konbini payment method options. + * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT + * payment method. */ - public Builder setKonbini(EmptyParam konbini) { - this.konbini = konbini; + public Builder setSofort(PaymentIntentCreateParams.PaymentMethodData.Sofort sofort) { + this.sofort = sofort; return this; } - /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR - * Card payment method options. - */ - public Builder setKrCard(PaymentIntentCreateParams.PaymentMethodOptions.KrCard krCard) { - this.krCard = krCard; + /** This hash contains details about the Stripe balance payment method. */ + public Builder setStripeBalance( + PaymentIntentCreateParams.PaymentMethodData.StripeBalance stripeBalance) { + this.stripeBalance = stripeBalance; return this; } /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR - * Card payment method options. + * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish + * payment method. */ - public Builder setKrCard(EmptyParam krCard) { - this.krCard = krCard; + public Builder setSwish(PaymentIntentCreateParams.PaymentMethodData.Swish swish) { + this.swish = swish; return this; } /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. + * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment + * method. */ - public Builder setLink(PaymentIntentCreateParams.PaymentMethodOptions.Link link) { - this.link = link; + public Builder setTwint(PaymentIntentCreateParams.PaymentMethodData.Twint twint) { + this.twint = twint; return this; } /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. + * 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 setLink(EmptyParam link) { - this.link = link; + public Builder setType(PaymentIntentCreateParams.PaymentMethodData.Type type) { + this.type = type; return this; } /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. + * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the + * US bank account payment method. */ - public Builder setMbWay(PaymentIntentCreateParams.PaymentMethodOptions.MbWay mbWay) { - this.mbWay = mbWay; + public Builder setUsBankAccount( + PaymentIntentCreateParams.PaymentMethodData.UsBankAccount usBankAccount) { + this.usBankAccount = usBankAccount; return this; } /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. + * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the + * wechat_pay payment method. */ - public Builder setMbWay(EmptyParam mbWay) { - this.mbWay = mbWay; + public Builder setWechatPay(PaymentIntentCreateParams.PaymentMethodData.WechatPay wechatPay) { + this.wechatPay = wechatPay; return this; } /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. + * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment + * method. */ - public Builder setMobilepay( - PaymentIntentCreateParams.PaymentMethodOptions.Mobilepay mobilepay) { - this.mobilepay = mobilepay; + public Builder setZip(PaymentIntentCreateParams.PaymentMethodData.Zip zip) { + this.zip = zip; return this; } + } - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - public Builder setMobilepay(EmptyParam mobilepay) { - this.mobilepay = mobilepay; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit { + /** Required. Customer's bank account number. */ + @SerializedName("account_number") + String accountNumber; /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setMultibanco( - PaymentIntentCreateParams.PaymentMethodOptions.Multibanco multibanco) { - this.multibanco = multibanco; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - public Builder setMultibanco(EmptyParam multibanco) { - this.multibanco = multibanco; - return this; - } + /** Required. Institution number of the customer's bank. */ + @SerializedName("institution_number") + String institutionNumber; - /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the - * Naver Pay payment method options. - */ - public Builder setNaverPay(PaymentIntentCreateParams.PaymentMethodOptions.NaverPay naverPay) { - this.naverPay = naverPay; - return this; - } + /** Required. Transit number of the customer's bank. */ + @SerializedName("transit_number") + String transitNumber; - /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the - * Naver Pay payment method options. - */ - public Builder setNaverPay(EmptyParam naverPay) { - this.naverPay = naverPay; - return this; + private AcssDebit( + String accountNumber, + Map extraParams, + String institutionNumber, + String transitNumber) { + this.accountNumber = accountNumber; + this.extraParams = extraParams; + this.institutionNumber = institutionNumber; + this.transitNumber = transitNumber; } - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about - * the NZ BECS Direct Debit payment method options. - */ - public Builder setNzBankAccount( - PaymentIntentCreateParams.PaymentMethodOptions.NzBankAccount nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about - * the NZ BECS Direct Debit payment method options. - */ - public Builder setNzBankAccount(EmptyParam nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; - } + public static class Builder { + private String accountNumber; - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - public Builder setOxxo(PaymentIntentCreateParams.PaymentMethodOptions.Oxxo oxxo) { - this.oxxo = oxxo; - return this; - } + private Map extraParams; - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - public Builder setOxxo(EmptyParam oxxo) { - this.oxxo = oxxo; - return this; - } + private String institutionNumber; - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - public Builder setP24(PaymentIntentCreateParams.PaymentMethodOptions.P24 p24) { - this.p24 = p24; - return this; - } + private String transitNumber; - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - public Builder setP24(EmptyParam p24) { - this.p24 = p24; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.AcssDebit build() { + return new PaymentIntentCreateParams.PaymentMethodData.AcssDebit( + this.accountNumber, this.extraParams, this.institutionNumber, this.transitNumber); + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. - */ - public Builder setPayByBank( - PaymentIntentCreateParams.PaymentMethodOptions.PayByBank payByBank) { - this.payByBank = payByBank; - return this; - } + /** Required. Customer's bank account number. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. - */ - public Builder setPayByBank(EmptyParam payByBank) { - this.payByBank = payByBank; - return this; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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 PaymentIntentCreateParams.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 + @EqualsAndHashCode(callSuper = false) + public static class Affirm { /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setPayco(PaymentIntentCreateParams.PaymentMethodOptions.Payco payco) { - this.payco = payco; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Affirm(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - public Builder setPayco(EmptyParam payco) { - this.payco = payco; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - public Builder setPaynow(PaymentIntentCreateParams.PaymentMethodOptions.Paynow paynow) { - this.paynow = paynow; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - public Builder setPaynow(EmptyParam paynow) { - this.paynow = paynow; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Affirm build() { + return new PaymentIntentCreateParams.PaymentMethodData.Affirm(this.extraParams); + } - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - public Builder setPaypal(PaymentIntentCreateParams.PaymentMethodOptions.Paypal paypal) { - this.paypal = paypal; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; + } - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - public Builder setPaypal(EmptyParam paypal) { - this.paypal = paypal; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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 + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpay { /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setPaypay(PaymentIntentCreateParams.PaymentMethodOptions.Paypay paypay) { - this.paypay = paypay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - public Builder setPaypay(EmptyParam paypay) { - this.paypay = paypay; - return this; + private AfterpayClearpay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - public Builder setPayto(PaymentIntentCreateParams.PaymentMethodOptions.Payto payto) { - this.payto = payto; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - public Builder setPayto(EmptyParam payto) { - this.payto = payto; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix - * payment method options. - */ - public Builder setPix(PaymentIntentCreateParams.PaymentMethodOptions.Pix pix) { - this.pix = pix; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay build() { + return new PaymentIntentCreateParams.PaymentMethodData.AfterpayClearpay(this.extraParams); + } - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix - * payment method options. - */ - public Builder setPix(EmptyParam pix) { - this.pix = pix; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; + } - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - public Builder setPromptpay( - PaymentIntentCreateParams.PaymentMethodOptions.Promptpay promptpay) { - this.promptpay = promptpay; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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 + @EqualsAndHashCode(callSuper = false) + public static class Alipay { /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setPromptpay(EmptyParam promptpay) { - this.promptpay = promptpay; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alipay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - public Builder setQris(PaymentIntentCreateParams.PaymentMethodOptions.Qris qris) { - this.qris = qris; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - public Builder setQris(EmptyParam qris) { - this.qris = qris; - return this; + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Alipay build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 PaymentIntentCreateParams.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 + @EqualsAndHashCode(callSuper = false) + public static class Alma { /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setRechnung(PaymentIntentCreateParams.PaymentMethodOptions.Rechnung rechnung) { - this.rechnung = rechnung; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alma(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - public Builder setRechnung(EmptyParam rechnung) { - this.rechnung = rechnung; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - public Builder setRevolutPay( - PaymentIntentCreateParams.PaymentMethodOptions.RevolutPay revolutPay) { - this.revolutPay = revolutPay; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - public Builder setRevolutPay(EmptyParam revolutPay) { - this.revolutPay = revolutPay; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Alma build() { + return new PaymentIntentCreateParams.PaymentMethodData.Alma(this.extraParams); + } - /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. - */ - public Builder setSamsungPay( - PaymentIntentCreateParams.PaymentMethodOptions.SamsungPay samsungPay) { - this.samsungPay = samsungPay; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Alma#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. - */ - public Builder setSamsungPay(EmptyParam samsungPay) { - this.samsungPay = samsungPay; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Alma#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 + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay { /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setSatispay(PaymentIntentCreateParams.PaymentMethodOptions.Satispay satispay) { - this.satispay = satispay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - public Builder setSatispay(EmptyParam satispay) { - this.satispay = satispay; - return this; + private AmazonPay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the - * SEPA Debit payment method options. - */ - public Builder setSepaDebit( - PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { - this.sepaDebit = sepaDebit; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the - * SEPA Debit payment method options. - */ - public Builder setSepaDebit(EmptyParam sepaDebit) { - this.sepaDebit = sepaDebit; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - public Builder setShopeepay( - PaymentIntentCreateParams.PaymentMethodOptions.Shopeepay shopeepay) { - this.shopeepay = shopeepay; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.AmazonPay build() { + return new PaymentIntentCreateParams.PaymentMethodData.AmazonPay(this.extraParams); + } - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - public Builder setShopeepay(EmptyParam shopeepay) { - this.shopeepay = shopeepay; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; + } - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - public Builder setSofort(PaymentIntentCreateParams.PaymentMethodOptions.Sofort sofort) { - this.sofort = sofort; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; + } } + } - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - public Builder setSofort(EmptyParam sofort) { - this.sofort = sofort; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit { + /** Required. The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; - /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. - */ - public Builder setStripeBalance( - PaymentIntentCreateParams.PaymentMethodOptions.StripeBalance stripeBalance) { - this.stripeBalance = stripeBalance; - return this; - } + /** Required. Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setStripeBalance(EmptyParam stripeBalance) { - this.stripeBalance = stripeBalance; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - public Builder setSwish(PaymentIntentCreateParams.PaymentMethodOptions.Swish swish) { - this.swish = swish; - return this; + private AuBecsDebit(String accountNumber, String bsbNumber, Map extraParams) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; } - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - public Builder setSwish(EmptyParam swish) { - this.swish = swish; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - public Builder setTwint(PaymentIntentCreateParams.PaymentMethodOptions.Twint twint) { - this.twint = twint; - return this; - } + public static class Builder { + private String accountNumber; - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - public Builder setTwint(EmptyParam twint) { - this.twint = twint; - return this; - } + private String bsbNumber; - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about - * the US bank account payment method options. - */ - public Builder setUsBankAccount( - PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { - this.usBankAccount = usBankAccount; - return this; - } + private Map extraParams; - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about - * the US bank account payment method options. - */ - public Builder setUsBankAccount(EmptyParam usBankAccount) { - this.usBankAccount = usBankAccount; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit build() { + return new PaymentIntentCreateParams.PaymentMethodData.AuBecsDebit( + this.accountNumber, this.bsbNumber, this.extraParams); + } - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - public Builder setWechatPay( - PaymentIntentCreateParams.PaymentMethodOptions.WechatPay wechatPay) { - this.wechatPay = wechatPay; - return this; - } + /** Required. The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - public Builder setWechatPay(EmptyParam wechatPay) { - this.wechatPay = wechatPay; - return this; - } + /** Required. Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip - * payment method options. - */ - public Builder setZip(PaymentIntentCreateParams.PaymentMethodOptions.Zip zip) { - this.zip = zip; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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; + } - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip - * payment method options. - */ - public Builder setZip(EmptyParam zip) { - this.zip = zip; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.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 @EqualsAndHashCode(callSuper = false) - public static class AcssDebit { + 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. @@ -15902,59 +15604,14 @@ public static class AcssDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - String targetDate; - - /** Bank account verification method. */ - @SerializedName("verification_method") - VerificationMethod verificationMethod; + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + String sortCode; - private AcssDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate, - VerificationMethod verificationMethod) { + private BacsDebit(String accountNumber, Map extraParams, String sortCode) { + this.accountNumber = accountNumber; this.extraParams = extraParams; - this.mandateOptions = mandateOptions; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - this.verificationMethod = verificationMethod; + this.sortCode = sortCode; } public static Builder builder() { @@ -15962,30 +15619,28 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; - - private MandateOptions mandateOptions; - - private ApiRequestParams.EnumParam setupFutureUsage; + private String accountNumber; - private String targetDate; + private Map extraParams; - private VerificationMethod verificationMethod; + private String sortCode; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit( - this.extraParams, - this.mandateOptions, - this.setupFutureUsage, - this.targetDate, - this.verificationMethod); + public PaymentIntentCreateParams.PaymentMethodData.BacsDebit build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.BacsDebit#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -15999,7 +15654,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.BacsDebit#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16010,440 +15665,233 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Additional fields for Mandate creation. */ - public Builder setMandateOptions( - PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions - mandateOptions) { - this.mandateOptions = mandateOptions; + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + public Builder setSortCode(String sortCode) { + this.sortCode = sortCode; return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCreateParams.PaymentMethodData.Bancontact build() { + return new PaymentIntentCreateParams.PaymentMethodData.Bancontact(this.extraParams); + } /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Bancontact#extraParams} for + * the field documentation. */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); 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}. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Bancontact#extraParams} for + * the field documentation. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(String targetDate) { - this.targetDate = targetDate; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billie { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Bank account verification method. */ - public Builder setVerificationMethod( - PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod - verificationMethod) { - this.verificationMethod = verificationMethod; - return this; - } + private Billie(Map extraParams) { + this.extraParams = extraParams; } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - @SerializedName("custom_mandate_url") - Object customMandateUrl; + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Billie build() { + return new PaymentIntentCreateParams.PaymentMethodData.Billie(this.extraParams); + } /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Billie#extraParams} for the + * field documentation. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Billie#extraParams} for the + * field documentation. */ - @SerializedName("interval_description") - String intervalDescription; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - /** Payment schedule for the mandate. */ - @SerializedName("payment_schedule") - PaymentSchedule paymentSchedule; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails { + /** Billing address. */ + @SerializedName("address") + Object address; - /** Transaction type of the mandate. */ - @SerializedName("transaction_type") - TransactionType transactionType; + /** Email address. */ + @SerializedName("email") + Object email; - private MandateOptions( - Object customMandateUrl, - Map extraParams, - String intervalDescription, - PaymentSchedule paymentSchedule, - TransactionType transactionType) { - this.customMandateUrl = customMandateUrl; - this.extraParams = extraParams; - this.intervalDescription = intervalDescription; - this.paymentSchedule = paymentSchedule; - this.transactionType = transactionType; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** Full name. */ + @SerializedName("name") + Object name; - public static class Builder { - private Object customMandateUrl; + /** Billing phone number (including extension). */ + @SerializedName("phone") + Object phone; - private Map extraParams; + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and + * non-LATAM sellers. + */ + @SerializedName("tax_id") + String taxId; - private String intervalDescription; + private BillingDetails( + Object address, + Object email, + Map extraParams, + Object name, + Object phone, + String taxId) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + this.taxId = taxId; + } - private PaymentSchedule paymentSchedule; + public static Builder builder() { + return new Builder(); + } - private TransactionType transactionType; + public static class Builder { + private Object address; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions( - this.customMandateUrl, - this.extraParams, - this.intervalDescription, - this.paymentSchedule, - this.transactionType); - } + private Object email; - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - public Builder setCustomMandateUrl(String customMandateUrl) { - this.customMandateUrl = customMandateUrl; - return this; - } + private Map extraParams; - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - public Builder setCustomMandateUrl(EmptyParam customMandateUrl) { - this.customMandateUrl = customMandateUrl; - return this; - } + private Object 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 - * PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Object phone; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private String taxId; - /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. - */ - public Builder setIntervalDescription(String intervalDescription) { - this.intervalDescription = intervalDescription; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.BillingDetails build() { + return new PaymentIntentCreateParams.PaymentMethodData.BillingDetails( + this.address, this.email, this.extraParams, this.name, this.phone, this.taxId); + } - /** Payment schedule for the mandate. */ - public Builder setPaymentSchedule( - PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions - .PaymentSchedule - paymentSchedule) { - this.paymentSchedule = paymentSchedule; - return this; - } - - /** Transaction type of the mandate. */ - public Builder setTransactionType( - PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions - .TransactionType - transactionType) { - this.transactionType = transactionType; - return this; - } - } - - public enum PaymentSchedule implements ApiRequestParams.EnumParam { - @SerializedName("combined") - COMBINED("combined"), - - @SerializedName("interval") - INTERVAL("interval"), - - @SerializedName("sporadic") - SPORADIC("sporadic"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PaymentSchedule(String value) { - this.value = value; - } - } - - public enum TransactionType implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), - - @SerializedName("personal") - PERSONAL("personal"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - TransactionType(String value) { - this.value = value; - } - } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"), - - @SerializedName("on_session") - ON_SESSION("on_session"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } - } - - public enum VerificationMethod implements ApiRequestParams.EnumParam { - @SerializedName("automatic") - AUTOMATIC("automatic"), - - @SerializedName("instant") - INSTANT("instant"), - - @SerializedName("microdeposits") - MICRODEPOSITS("microdeposits"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - VerificationMethod(String value) { - this.value = value; + /** Billing address. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodData.BillingDetails.Address address) { + this.address = address; + return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Affirm { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Preferred language of the Affirm authorization page that the customer is redirected to. */ - @SerializedName("preferred_locale") - String preferredLocale; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; - - private Affirm( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - String preferredLocale, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.preferredLocale = preferredLocale; - this.setupFutureUsage = setupFutureUsage; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - - private Map extraParams; - - private String preferredLocale; - - private SetupFutureUsage setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Affirm build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Affirm( - this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); + /** Billing address. */ + public Builder setAddress(EmptyParam address) { + this.address = address; + return this; } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; + /** Email address. */ + public Builder setEmail(String email) { + this.email = email; return this; } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; + /** 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 PaymentIntentCreateParams.PaymentMethodOptions.Affirm#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.BillingDetails#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16456,8 +15904,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Affirm#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.BillingDetails#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16467,87 +15915,203 @@ public Builder putAllExtraParam(Map 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; + } + /** - * Preferred language of the Affirm authorization page that the customer is redirected to. + * Taxpayer identification number. Used only for transactions between LATAM buyers and + * non-LATAM sellers. */ - public Builder setPreferredLocale(String preferredLocale) { - this.preferredLocale = preferredLocale; + public Builder setTaxId(String taxId) { + this.taxId = taxId; 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}. + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Affirm.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @SerializedName("country") + String country; - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; - CaptureMethod(String value) { - this.value = value; + /** Address line 2, such as the 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 enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private String city; - SetupFutureUsage(String value) { - this.value = value; + 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 PaymentIntentCreateParams.PaymentMethodData.BillingDetails.Address build() { + return new PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.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 + * PaymentIntentCreateParams.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the 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 @EqualsAndHashCode(callSuper = false) - public static class AfterpayClearpay { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + 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. @@ -16557,49 +16121,8 @@ public static class AfterpayClearpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * An internal identifier or reference that this payment corresponds to. You must limit the - * identifier to 128 characters, and it can only contain letters, numbers, underscores, - * backslashes, and dashes. This field differs from the statement descriptor and item name. - */ - @SerializedName("reference") - String reference; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; - - private AfterpayClearpay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - String reference, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + private Blik(Map extraParams) { this.extraParams = extraParams; - this.reference = reference; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -16607,57 +16130,17 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private String reference; - - private SetupFutureUsage setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay( - this.captureMethod, this.extraParams, this.reference, this.setupFutureUsage); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod - captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentCreateParams.PaymentMethodData.Blik build() { + return new PaymentIntentCreateParams.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 - * PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Blik#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16671,8 +16154,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Blik#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16682,77 +16164,12 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - - /** - * An internal identifier or reference that this payment corresponds to. You must limit the - * identifier to 128 characters, and it can only contain letters, numbers, underscores, - * backslashes, and dashes. This field differs from the statement descriptor and item name. - */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Alipay { + 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. @@ -16763,34 +16180,15 @@ public static class Alipay { Map extraParams; /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Required. The tax ID of the customer (CPF for individual consumers or CNPJ + * for businesses consumers) */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + @SerializedName("tax_id") + String taxId; - private Alipay(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + private Boleto(Map extraParams, String taxId) { this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; + this.taxId = taxId; } public static Builder builder() { @@ -16800,19 +16198,19 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; + private String taxId; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Alipay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Alipay( - this.extraParams, this.setupFutureUsage); + public PaymentIntentCreateParams.PaymentMethodData.Boleto build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentMethodOptions.Alipay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16825,8 +16223,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alipay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16837,98 +16235,19 @@ public Builder putAllExtraParam(Map map) { } /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Alipay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Required. The tax ID of the customer (CPF for individual consumers or + * CNPJ for businesses consumers) */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder setTaxId(String taxId) { + this.taxId = taxId; return this; } } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } - } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Alma { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + 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. @@ -16938,8 +16257,7 @@ public static class Alma { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; + private Cashapp(Map extraParams) { this.extraParams = extraParams; } @@ -16948,51 +16266,17 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Alma build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Alma( - this.captureMethod, this.extraParams); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentCreateParams.PaymentMethodData.Cashapp build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentMethodOptions.Alma#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Cashapp#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -17006,7 +16290,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alma#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Cashapp#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -17017,36 +16301,11 @@ public Builder putAllExtraParam(Map map) { return this; } } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } } @Getter @EqualsAndHashCode(callSuper = false) - public static class AmazonPay { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + public static class Crypto { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -17056,35 +16315,8 @@ public static class AmazonPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply - * with regional legislation and network rules, such as SCA. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - private AmazonPay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; + private Crypto(Map extraParams) { this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -17092,54 +16324,18 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentCreateParams.PaymentMethodData.Crypto build() { + return new PaymentIntentCreateParams.PaymentMethodData.Crypto(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 PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17152,8 +16348,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17162,91 +16358,12 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class AuBecsDebit { + 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. @@ -17256,47 +16373,8 @@ public static class AuBecsDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - String targetDate; - - private AuBecsDebit( - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate) { + private CustomerBalance(Map extraParams) { this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; } public static Builder builder() { @@ -17306,20 +16384,15 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; - - private String targetDate; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage, this.targetDate); + public PaymentIntentCreateParams.PaymentMethodData.CustomerBalance build() { + return new PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.CustomerBalance#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -17333,7 +16406,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.CustomerBalance#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -17343,100 +16416,16 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit.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; - } - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(String targetDate) { - this.targetDate = targetDate; - return this; - } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"), - - @SerializedName("on_session") - ON_SESSION("on_session"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class BacsDebit { + 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. @@ -17446,53 +16435,9 @@ public static class BacsDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - String targetDate; - - private BacsDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - String targetDate) { + private Eps(Bank bank, Map extraParams) { + this.bank = bank; this.extraParams = extraParams; - this.mandateOptions = mandateOptions; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; } public static Builder builder() { @@ -17500,25 +16445,26 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; - - private MandateOptions mandateOptions; - - private ApiRequestParams.EnumParam setupFutureUsage; + private Bank bank; - private String targetDate; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); + public PaymentIntentCreateParams.PaymentMethodData.Eps build() { + return new PaymentIntentCreateParams.PaymentMethodData.Eps(this.bank, this.extraParams); + } + + /** The customer's bank. */ + public Builder setBank(PaymentIntentCreateParams.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 PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Eps#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17531,8 +16477,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Eps#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17541,193 +16487,97 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } - /** Additional fields for Mandate creation. */ - public Builder setMandateOptions( - PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions - mandateOptions) { - this.mandateOptions = mandateOptions; - return this; - } + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("arzte_und_apotheker_bank") + ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName("austrian_anadi_bank_ag") + AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"), - /** - * 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; - } + @SerializedName("bank_austria") + BANK_AUSTRIA("bank_austria"), - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(String targetDate) { - this.targetDate = targetDate; - return this; - } - } + @SerializedName("bankhaus_carl_spangler") + BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("bankhaus_schelhammer_und_schattera_ag") + BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), - /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special characters: - * '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - */ - @SerializedName("reference_prefix") - Object referencePrefix; + @SerializedName("bawag_psk_ag") + BAWAG_PSK_AG("bawag_psk_ag"), - private MandateOptions(Map extraParams, Object referencePrefix) { - this.extraParams = extraParams; - this.referencePrefix = referencePrefix; - } + @SerializedName("bks_bank_ag") + BKS_BANK_AG("bks_bank_ag"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("brull_kallmus_bank_ag") + BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), - public static class Builder { - private Map extraParams; + @SerializedName("btv_vier_lander_bank") + BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), - private Object referencePrefix; + @SerializedName("capital_bank_grawe_gruppe_ag") + CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions( - this.extraParams, this.referencePrefix); - } + @SerializedName("deutsche_bank_ag") + DEUTSCHE_BANK_AG("deutsche_bank_ag"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("dolomitenbank") + DOLOMITENBANK("dolomitenbank"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("easybank_ag") + EASYBANK_AG("easybank_ag"), - /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special - * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - */ - public Builder setReferencePrefix(String referencePrefix) { - this.referencePrefix = referencePrefix; - return this; - } + @SerializedName("erste_bank_und_sparkassen") + ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), - /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special - * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - */ - public Builder setReferencePrefix(EmptyParam referencePrefix) { - this.referencePrefix = referencePrefix; - return this; - } - } - } + @SerializedName("hypo_alpeadriabank_international_ag") + HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("hypo_bank_burgenland_aktiengesellschaft") + HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), - @SerializedName("off_session") - OFF_SESSION("off_session"), + @SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien") + HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), - @SerializedName("on_session") - ON_SESSION("on_session"); + @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; - SetupFutureUsage(String value) { + Bank(String value) { this.value = value; } } @@ -17735,7 +16585,15 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Bancontact { + 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. @@ -17745,45 +16603,10 @@ public static class Bancontact { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Preferred language of the Bancontact authorization page that the customer is redirected to. - */ - @SerializedName("preferred_language") - PreferredLanguage preferredLanguage; - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - private Bancontact( - Map extraParams, - PreferredLanguage preferredLanguage, - ApiRequestParams.EnumParam setupFutureUsage) { + private Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) { + this.accountHolderType = accountHolderType; + this.bank = bank; this.extraParams = extraParams; - this.preferredLanguage = preferredLanguage; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -17791,23 +16614,36 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; + private AccountHolderType accountHolderType; - private PreferredLanguage preferredLanguage; + private Bank bank; - private ApiRequestParams.EnumParam setupFutureUsage; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Bancontact build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Bancontact( - this.extraParams, this.preferredLanguage, this.setupFutureUsage); + public PaymentIntentCreateParams.PaymentMethodData.Fpx build() { + return new PaymentIntentCreateParams.PaymentMethodData.Fpx( + this.accountHolderType, this.bank, this.extraParams); + } + + /** Account holder type for FPX transaction. */ + public Builder setAccountHolderType( + PaymentIntentCreateParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { + this.accountHolderType = accountHolderType; + return this; + } + + /** Required. The customer's bank. */ + public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.Fpx.Bank bank) { + this.bank = bank; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Bancontact#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Fpx#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17820,8 +16656,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Bancontact#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Fpx#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17830,111 +16666,94 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } - /** - * Preferred language of the Bancontact authorization page that the customer is redirected - * to. - */ - public Builder setPreferredLanguage( - PaymentIntentCreateParams.PaymentMethodOptions.Bancontact.PreferredLanguage - preferredLanguage) { - this.preferredLanguage = preferredLanguage; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Bancontact.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + public enum AccountHolderType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), - /** - * 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; + @SerializedName("individual") + INDIVIDUAL("individual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountHolderType(String value) { + this.value = value; } } - public enum PreferredLanguage implements ApiRequestParams.EnumParam { - @SerializedName("de") - DE("de"), + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("affin_bank") + AFFIN_BANK("affin_bank"), - @SerializedName("en") - EN("en"), + @SerializedName("agrobank") + AGROBANK("agrobank"), - @SerializedName("fr") - FR("fr"), + @SerializedName("alliance_bank") + ALLIANCE_BANK("alliance_bank"), - @SerializedName("nl") - NL("nl"); + @SerializedName("ambank") + AMBANK("ambank"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("bank_islam") + BANK_ISLAM("bank_islam"), - PreferredLanguage(String value) { - this.value = value; - } - } + @SerializedName("bank_muamalat") + BANK_MUAMALAT("bank_muamalat"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("bank_of_china") + BANK_OF_CHINA("bank_of_china"), - @SerializedName("off_session") - OFF_SESSION("off_session"); + @SerializedName("bank_rakyat") + BANK_RAKYAT("bank_rakyat"), + + @SerializedName("bsn") + BSN("bsn"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("deutsche_bank") + DEUTSCHE_BANK("deutsche_bank"), + + @SerializedName("hong_leong_bank") + HONG_LEONG_BANK("hong_leong_bank"), + + @SerializedName("hsbc") + HSBC("hsbc"), + + @SerializedName("kfh") + KFH("kfh"), + + @SerializedName("maybank2e") + MAYBANK2E("maybank2e"), + + @SerializedName("maybank2u") + MAYBANK2U("maybank2u"), + + @SerializedName("ocbc") + OCBC("ocbc"), + + @SerializedName("pb_enterprise") + PB_ENTERPRISE("pb_enterprise"), + + @SerializedName("public_bank") + PUBLIC_BANK("public_bank"), + + @SerializedName("rhb") + RHB("rhb"), + + @SerializedName("standard_chartered") + STANDARD_CHARTERED("standard_chartered"), + + @SerializedName("uob") + UOB("uob"); @Getter(onMethod_ = {@Override}) private final String value; - SetupFutureUsage(String value) { + Bank(String value) { this.value = value; } } @@ -17942,20 +16761,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Billie { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + public static class Giropay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -17965,8 +16771,7 @@ public static class Billie { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; + private Giropay(Map extraParams) { this.extraParams = extraParams; } @@ -17975,52 +16780,18 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Billie build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Billie( - this.captureMethod, this.extraParams); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentCreateParams.PaymentMethodData.Giropay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Giropay(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Billie#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Giropay#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -18033,8 +16804,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Billie#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Giropay#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -18044,30 +16815,11 @@ public Builder putAllExtraParam(Map map) { return this; } } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Blik { - /** - * The 6-digit BLIK code that a customer has generated using their banking application. Can - * only be set on confirmation. - */ - @SerializedName("code") - String code; - + public static class Gopay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -18077,39 +16829,8 @@ public static class Blik { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - private Blik( - String code, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.code = code; + private Gopay(Map extraParams) { this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -18117,31 +16838,17 @@ public static Builder builder() { } public static class Builder { - private String code; - private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Blik build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Blik( - this.code, this.extraParams, this.setupFutureUsage); - } - - /** - * The 6-digit BLIK code that a customer has generated using their banking application. Can - * only be set on confirmation. - */ - public Builder setCode(String code) { - this.code = code; - return this; + public PaymentIntentCreateParams.PaymentMethodData.Gopay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Gopay(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 PaymentIntentCreateParams.PaymentMethodOptions.Blik#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Gopay#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -18155,7 +16862,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Blik#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Gopay#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -18165,90 +16872,73 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Grabpay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Grabpay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Grabpay(this.extraParams); + } /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Grabpay#extraParams} for the + * field documentation. */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Blik.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); 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}. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Grabpay#extraParams} for the + * field documentation. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - SetupFutureUsage(String value) { - this.value = value; - } - } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Boleto { - /** - * The number of calendar days before a Boleto voucher expires. For example, if you create a - * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will - * expire on Wednesday at 23:59 America/Sao_Paulo time. - */ - @SerializedName("expires_after_days") - Long expiresAfterDays; + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; /** * Map of extra parameters for custom features not available in this client library. The @@ -18259,39 +16949,9 @@ public static class Boleto { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - private Boleto( - Long expiresAfterDays, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.expiresAfterDays = expiresAfterDays; + private IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -18299,33 +16959,28 @@ public static Builder builder() { } public static class Builder { - private Long expiresAfterDays; + private Bank bank; private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Boleto build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Boleto( - this.expiresAfterDays, this.extraParams, this.setupFutureUsage); + public PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer build() { + return new PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); } - /** - * The number of calendar days before a Boleto voucher expires. For example, if you create a - * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will - * expire on Wednesday at 23:59 America/Sao_Paulo time. - */ - public Builder setExpiresAfterDays(Long expiresAfterDays) { - this.expiresAfterDays = expiresAfterDays; + /** Bank where the account is held. */ + public Builder setBank( + PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Boleto#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -18338,8 +16993,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Boleto#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -18348,82 +17003,28 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Boleto.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), - /** - * 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; - } - } + @SerializedName("bni") + BNI("bni"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("bri") + BRI("bri"), - @SerializedName("off_session") - OFF_SESSION("off_session"), + @SerializedName("cimb") + CIMB("cimb"), - @SerializedName("on_session") - ON_SESSION("on_session"); + @SerializedName("permata") + PERMATA("permata"); @Getter(onMethod_ = {@Override}) private final String value; - SetupFutureUsage(String value) { + Bank(String value) { this.value = value; } } @@ -18431,27 +17032,13 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Card { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + public static class Ideal { /** - * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, the - * CVC value will be verified during the card payment attempt. This parameter can only be - * provided during confirmation. + * The customer's bank. Only use this parameter for existing customers. Don't use it for new + * customers. */ - @SerializedName("cvc_token") - String cvcToken; + @SerializedName("bank") + Bank bank; /** * Map of extra parameters for custom features not available in this client library. The @@ -18462,315 +17049,214 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - @SerializedName("installments") - Installments installments; + private Ideal(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } - /** Configuration options for setting up an eMandate for cards issued in India. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + public static Builder builder() { + return new Builder(); + } - /** - * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail - * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided - * during confirmation. - */ - @SerializedName("moto") - Boolean moto; + public static class Builder { + private Bank bank; - /** - * Selected network to process this PaymentIntent on. Depends on the available networks of the - * card attached to the PaymentIntent. Can be only set confirm-time. - */ - @SerializedName("network") - Network network; + private Map extraParams; - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - @SerializedName("request_decremental_authorization") - RequestDecrementalAuthorization requestDecrementalAuthorization; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Ideal build() { + return new PaymentIntentCreateParams.PaymentMethodData.Ideal(this.bank, this.extraParams); + } - /** - * Request ability to capture beyond the standard - * authorization validity window for this PaymentIntent. - */ - @SerializedName("request_extended_authorization") - RequestExtendedAuthorization requestExtendedAuthorization; + /** + * The customer's bank. Only use this parameter for existing customers. Don't use it for new + * customers. + */ + public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.Ideal.Bank bank) { + this.bank = bank; + return this; + } - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - @SerializedName("request_incremental_authorization") - RequestIncrementalAuthorization requestIncrementalAuthorization; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Ideal#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - @SerializedName("request_multicapture") - RequestMulticapture requestMulticapture; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Ideal#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - @SerializedName("request_overcapture") - RequestOvercapture requestOvercapture; + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("abn_amro") + ABN_AMRO("abn_amro"), - /** Request partial authorization on this PaymentIntent. */ - @SerializedName("request_partial_authorization") - RequestPartialAuthorization requestPartialAuthorization; + @SerializedName("asn_bank") + ASN_BANK("asn_bank"), - /** - * We strongly recommend that you rely on our SCA Engine to automatically prompt your - * customers for authentication based on risk level and other requirements. - * However, if you wish to request 3D Secure based on logic from your own fraud engine, - * provide this option. If not provided, this value defaults to {@code automatic}. Read our - * guide on manually - * requesting 3D Secure for more information on how this configuration interacts with - * Radar and our SCA Engine. - */ - @SerializedName("request_three_d_secure") - RequestThreeDSecure requestThreeDSecure; + @SerializedName("bunq") + BUNQ("bunq"), - /** - * When enabled, using a card that is attached to a customer will require the CVC to be - * provided again (i.e. using the cvc_token parameter). - */ - @SerializedName("require_cvc_recollection") - Boolean requireCvcRecollection; + @SerializedName("buut") + BUUT("buut"), - /** - * 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; + @SerializedName("handelsbanken") + HANDELSBANKEN("handelsbanken"), - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor - * that’s set on the account to form the complete statement descriptor. Maximum 22 characters. - * On card statements, the concatenation of both prefix and suffix (including - * separators) will appear truncated to 22 characters. - */ - @SerializedName("statement_descriptor_suffix_kana") - Object statementDescriptorSuffixKana; + @SerializedName("ing") + ING("ing"), - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 - * characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. - */ - @SerializedName("statement_descriptor_suffix_kanji") - Object statementDescriptorSuffixKanji; + @SerializedName("knab") + KNAB("knab"), - /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. - */ - @SerializedName("statement_details") - Object statementDetails; - - /** - * If 3D Secure authentication was performed with a third-party provider, the authentication - * details to use for this payment. - */ - @SerializedName("three_d_secure") - ThreeDSecure threeDSecure; - - private Card( - ApiRequestParams.EnumParam captureMethod, - String cvcToken, - Map extraParams, - Installments installments, - MandateOptions mandateOptions, - Boolean moto, - Network network, - RequestDecrementalAuthorization requestDecrementalAuthorization, - RequestExtendedAuthorization requestExtendedAuthorization, - RequestIncrementalAuthorization requestIncrementalAuthorization, - RequestMulticapture requestMulticapture, - RequestOvercapture requestOvercapture, - RequestPartialAuthorization requestPartialAuthorization, - RequestThreeDSecure requestThreeDSecure, - Boolean requireCvcRecollection, - ApiRequestParams.EnumParam setupFutureUsage, - Object statementDescriptorSuffixKana, - Object statementDescriptorSuffixKanji, - Object statementDetails, - ThreeDSecure threeDSecure) { - this.captureMethod = captureMethod; - this.cvcToken = cvcToken; - this.extraParams = extraParams; - this.installments = installments; - this.mandateOptions = mandateOptions; - this.moto = moto; - this.network = network; - this.requestDecrementalAuthorization = requestDecrementalAuthorization; - this.requestExtendedAuthorization = requestExtendedAuthorization; - this.requestIncrementalAuthorization = requestIncrementalAuthorization; - this.requestMulticapture = requestMulticapture; - this.requestOvercapture = requestOvercapture; - this.requestPartialAuthorization = requestPartialAuthorization; - this.requestThreeDSecure = requestThreeDSecure; - this.requireCvcRecollection = requireCvcRecollection; - this.setupFutureUsage = setupFutureUsage; - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; - this.statementDetails = statementDetails; - this.threeDSecure = threeDSecure; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - - private String cvcToken; - - private Map extraParams; - - private Installments installments; - - private MandateOptions mandateOptions; + @SerializedName("moneyou") + MONEYOU("moneyou"), - private Boolean moto; + @SerializedName("n26") + N26("n26"), - private Network network; + @SerializedName("nn") + NN("nn"), - private RequestDecrementalAuthorization requestDecrementalAuthorization; + @SerializedName("rabobank") + RABOBANK("rabobank"), - private RequestExtendedAuthorization requestExtendedAuthorization; + @SerializedName("regiobank") + REGIOBANK("regiobank"), - private RequestIncrementalAuthorization requestIncrementalAuthorization; + @SerializedName("revolut") + REVOLUT("revolut"), - private RequestMulticapture requestMulticapture; + @SerializedName("sns_bank") + SNS_BANK("sns_bank"), - private RequestOvercapture requestOvercapture; + @SerializedName("triodos_bank") + TRIODOS_BANK("triodos_bank"), - private RequestPartialAuthorization requestPartialAuthorization; + @SerializedName("van_lanschot") + VAN_LANSCHOT("van_lanschot"), - private RequestThreeDSecure requestThreeDSecure; + @SerializedName("yoursafe") + YOURSAFE("yoursafe"); - private Boolean requireCvcRecollection; + @Getter(onMethod_ = {@Override}) + private final String value; - private ApiRequestParams.EnumParam setupFutureUsage; + Bank(String value) { + this.value = value; + } + } + } - private Object statementDescriptorSuffixKana; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InteracPresent { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Object statementDescriptorSuffixKanji; + private InteracPresent(Map extraParams) { + this.extraParams = extraParams; + } - private Object statementDetails; + public static Builder builder() { + return new Builder(); + } - private ThreeDSecure threeDSecure; + public static class Builder { + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card( - this.captureMethod, - this.cvcToken, - this.extraParams, - this.installments, - this.mandateOptions, - this.moto, - this.network, - this.requestDecrementalAuthorization, - this.requestExtendedAuthorization, - this.requestIncrementalAuthorization, - this.requestMulticapture, - this.requestOvercapture, - this.requestPartialAuthorization, - this.requestThreeDSecure, - this.requireCvcRecollection, - this.setupFutureUsage, - this.statementDescriptorSuffixKana, - this.statementDescriptorSuffixKanji, - this.statementDetails, - this.threeDSecure); + public PaymentIntentCreateParams.PaymentMethodData.InteracPresent build() { + return new PaymentIntentCreateParams.PaymentMethodData.InteracPresent(this.extraParams); } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.InteracPresent#extraParams} + * for the field documentation. */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.InteracPresent#extraParams} + * for the field documentation. */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } - /** - * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, - * the CVC value will be verified during the card payment attempt. This parameter can only - * be provided during confirmation. - */ - public Builder setCvcToken(String cvcToken) { - this.cvcToken = cvcToken; - return this; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private KakaoPay(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 PaymentIntentCreateParams.PaymentMethodData.KakaoPay build() { + return new PaymentIntentCreateParams.PaymentMethodData.KakaoPay(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 PaymentIntentCreateParams.PaymentMethodOptions.Card#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.KakaoPay#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -18784,7 +17270,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Card#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.KakaoPay#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -18794,287 +17280,12678 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } + } - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - public Builder setInstallments( - PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments installments) { - this.installments = installments; - return this; - } - - /** Configuration options for setting up an eMandate for cards issued in India. */ - public Builder setMandateOptions( - PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions mandateOptions) { - this.mandateOptions = mandateOptions; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Klarna { + /** Customer's date of birth. */ + @SerializedName("dob") + Dob dob; - /** - * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail - * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided - * during confirmation. - */ - public Builder setMoto(Boolean moto) { - this.moto = moto; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Selected network to process this PaymentIntent on. Depends on the available networks of - * the card attached to the PaymentIntent. Can be only set confirm-time. - */ - public Builder setNetwork( - PaymentIntentCreateParams.PaymentMethodOptions.Card.Network network) { - this.network = network; - return this; + private Klarna(Dob dob, Map extraParams) { + this.dob = dob; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Dob dob; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Klarna build() { + return new PaymentIntentCreateParams.PaymentMethodData.Klarna(this.dob, this.extraParams); } - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - public Builder setRequestDecrementalAuthorization( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization - requestDecrementalAuthorization) { - this.requestDecrementalAuthorization = requestDecrementalAuthorization; + /** Customer's date of birth. */ + public Builder setDob(PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob dob) { + this.dob = dob; return this; } /** - * Request ability to capture beyond the - * standard authorization validity window for this PaymentIntent. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Klarna#extraParams} for the + * field documentation. */ - public Builder setRequestExtendedAuthorization( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestExtendedAuthorization - requestExtendedAuthorization) { - this.requestExtendedAuthorization = requestExtendedAuthorization; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Request ability to increment the - * authorization for this PaymentIntent. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Klarna#extraParams} for the + * field documentation. */ - public Builder setRequestIncrementalAuthorization( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization - requestIncrementalAuthorization) { - this.requestIncrementalAuthorization = requestIncrementalAuthorization; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Dob { + /** Required. The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; /** - * Request ability to make multiple - * captures for this PaymentIntent. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder setRequestMulticapture( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestMulticapture - requestMulticapture) { - this.requestMulticapture = requestMulticapture; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of birth. */ + @SerializedName("year") + Long year; + + private Dob(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; } - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - public Builder setRequestOvercapture( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestOvercapture - requestOvercapture) { - this.requestOvercapture = requestOvercapture; - return this; + public static Builder builder() { + return new Builder(); } - /** Request partial authorization on this PaymentIntent. */ - public Builder setRequestPartialAuthorization( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestPartialAuthorization - requestPartialAuthorization) { - this.requestPartialAuthorization = requestPartialAuthorization; - return this; + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob build() { + return new PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Klarna.Dob#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } } + } + } - /** - * We strongly recommend that you rely on our SCA Engine to automatically prompt your - * customers for authentication based on risk level and other requirements. - * However, if you wish to request 3D Secure based on logic from your own fraud engine, - * provide this option. If not provided, this value defaults to {@code automatic}. Read our - * guide on manually - * requesting 3D Secure for more information on how this configuration interacts with - * Radar and our SCA Engine. - */ - public Builder setRequestThreeDSecure( - PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestThreeDSecure - requestThreeDSecure) { - this.requestThreeDSecure = requestThreeDSecure; - return this; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Konbini { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Konbini(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Konbini build() { + return new PaymentIntentCreateParams.PaymentMethodData.Konbini(this.extraParams); } /** - * When enabled, using a card that is attached to a customer will require the CVC to be - * provided again (i.e. using the cvc_token parameter). + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Konbini#extraParams} for the + * field documentation. */ - public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { - this.requireCvcRecollection = requireCvcRecollection; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); 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}. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Konbini#extraParams} for the + * field documentation. */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Card.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KrCard { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private KrCard(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 PaymentIntentCreateParams.PaymentMethodData.KrCard build() { + return new PaymentIntentCreateParams.PaymentMethodData.KrCard(this.extraParams); + } /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.KrCard#extraParams} for the + * field documentation. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 22 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 22 characters. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.KrCard#extraParams} for the + * field documentation. */ - public Builder setStatementDescriptorSuffixKana(String statementDescriptorSuffixKana) { - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Link { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Link(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Link build() { + return new PaymentIntentCreateParams.PaymentMethodData.Link(this.extraParams); + } /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 22 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 22 characters. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Link#extraParams} for the + * field documentation. */ - public Builder setStatementDescriptorSuffixKana(EmptyParam statementDescriptorSuffixKana) { - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 17 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Link#extraParams} for the + * field documentation. */ - public Builder setStatementDescriptorSuffixKanji(String statementDescriptorSuffixKanji) { - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.MbWay build() { + return new PaymentIntentCreateParams.PaymentMethodData.MbWay(this.extraParams); + } /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 17 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. */ - public Builder setStatementDescriptorSuffixKanji( - EmptyParam statementDescriptorSuffixKanji) { - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. */ - public Builder setStatementDetails( - PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails statementDetails) { - this.statementDetails = statementDetails; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Mobilepay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Mobilepay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Mobilepay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Mobilepay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Mobilepay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Multibanco { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Multibanco(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Multibanco build() { + return new PaymentIntentCreateParams.PaymentMethodData.Multibanco(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Multibanco#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Multibanco#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NaverPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this + * defaults to {@code card}. + */ + @SerializedName("funding") + Funding funding; + + private NaverPay(Map extraParams, Funding funding) { + this.extraParams = extraParams; + this.funding = funding; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Funding funding; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.NaverPay build() { + return new PaymentIntentCreateParams.PaymentMethodData.NaverPay( + this.extraParams, this.funding); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.NaverPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.NaverPay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this + * defaults to {@code card}. + */ + public Builder setFunding( + PaymentIntentCreateParams.PaymentMethodData.NaverPay.Funding funding) { + this.funding = funding; + return this; + } + } + + public enum Funding implements ApiRequestParams.EnumParam { + @SerializedName("card") + CARD("card"), + + @SerializedName("points") + POINTS("points"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Funding(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NzBankAccount { + /** + * The name on the bank account. Only required if the account holder name is different from + * the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** Required. The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Required. The numeric code for the bank account's bank. */ + @SerializedName("bank_code") + String bankCode; + + /** Required. The numeric code for the bank account's bank branch. */ + @SerializedName("branch_code") + String branchCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + @SerializedName("reference") + String reference; + + /** Required. The suffix of the bank account number. */ + @SerializedName("suffix") + String suffix; + + private NzBankAccount( + String accountHolderName, + String accountNumber, + String bankCode, + String branchCode, + Map extraParams, + String reference, + String suffix) { + this.accountHolderName = accountHolderName; + this.accountNumber = accountNumber; + this.bankCode = bankCode; + this.branchCode = branchCode; + this.extraParams = extraParams; + this.reference = reference; + this.suffix = suffix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountHolderName; + + private String accountNumber; + + private String bankCode; + + private String branchCode; + + private Map extraParams; + + private String reference; + + private String suffix; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.NzBankAccount build() { + return new PaymentIntentCreateParams.PaymentMethodData.NzBankAccount( + this.accountHolderName, + this.accountNumber, + this.bankCode, + this.branchCode, + this.extraParams, + this.reference, + this.suffix); + } + + /** + * The name on the bank account. Only required if the account holder name is different from + * the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ + public Builder setAccountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } + + /** Required. The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Required. The numeric code for the bank account's bank. */ + public Builder setBankCode(String bankCode) { + this.bankCode = bankCode; + return this; + } + + /** Required. The numeric code for the bank account's bank branch. */ + public Builder setBranchCode(String branchCode) { + this.branchCode = branchCode; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.NzBankAccount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.NzBankAccount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** Required. The suffix of the bank account number. */ + public Builder setSuffix(String suffix) { + this.suffix = suffix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Oxxo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Oxxo(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Oxxo build() { + return new PaymentIntentCreateParams.PaymentMethodData.Oxxo(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Oxxo#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Oxxo#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class P24 { + /** The customer's bank. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private P24(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.P24 build() { + return new PaymentIntentCreateParams.PaymentMethodData.P24(this.bank, this.extraParams); + } + + /** The customer's bank. */ + public Builder setBank(PaymentIntentCreateParams.PaymentMethodData.P24.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.P24#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.P24#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("alior_bank") + ALIOR_BANK("alior_bank"), + + @SerializedName("bank_millennium") + BANK_MILLENNIUM("bank_millennium"), + + @SerializedName("bank_nowy_bfg_sa") + BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), + + @SerializedName("bank_pekao_sa") + BANK_PEKAO_SA("bank_pekao_sa"), + + @SerializedName("banki_spbdzielcze") + BANKI_SPBDZIELCZE("banki_spbdzielcze"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + + @SerializedName("boz") + BOZ("boz"), + + @SerializedName("citi_handlowy") + CITI_HANDLOWY("citi_handlowy"), + + @SerializedName("credit_agricole") + CREDIT_AGRICOLE("credit_agricole"), + + @SerializedName("envelobank") + ENVELOBANK("envelobank"), + + @SerializedName("etransfer_pocztowy24") + ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), + + @SerializedName("getin_bank") + GETIN_BANK("getin_bank"), + + @SerializedName("ideabank") + IDEABANK("ideabank"), + + @SerializedName("ing") + ING("ing"), + + @SerializedName("inteligo") + INTELIGO("inteligo"), + + @SerializedName("mbank_mtransfer") + MBANK_MTRANSFER("mbank_mtransfer"), + + @SerializedName("nest_przelew") + NEST_PRZELEW("nest_przelew"), + + @SerializedName("noble_pay") + NOBLE_PAY("noble_pay"), + + @SerializedName("pbac_z_ipko") + PBAC_Z_IPKO("pbac_z_ipko"), + + @SerializedName("plus_bank") + PLUS_BANK("plus_bank"), + + @SerializedName("santander_przelew24") + SANTANDER_PRZELEW24("santander_przelew24"), + + @SerializedName("tmobile_usbugi_bankowe") + TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), + + @SerializedName("toyota_bank") + TOYOTA_BANK("toyota_bank"), + + @SerializedName("velobank") + VELOBANK("velobank"), + + @SerializedName("volkswagen_bank") + VOLKSWAGEN_BANK("volkswagen_bank"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 PayByBank(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 PaymentIntentCreateParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentCreateParams.PaymentMethodData.PayByBank(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 PaymentIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.PayByBank#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 + @EqualsAndHashCode(callSuper = false) + public static class Payco { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Payco(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Payco build() { + return new PaymentIntentCreateParams.PaymentMethodData.Payco(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payco#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payco#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paynow { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paynow(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Paynow build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paynow(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paynow#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paynow#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypal(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Paypal build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paypal(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypal#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypal#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(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 PaymentIntentCreateParams.PaymentMethodData.Paypay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paypay(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 PaymentIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypay#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 + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + private String payId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Payto build() { + return new PaymentIntentCreateParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Pix(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Pix build() { + return new PaymentIntentCreateParams.PaymentMethodData.Pix(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Promptpay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Promptpay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Promptpay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Promptpay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Promptpay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Promptpay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Qris { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Qris(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 PaymentIntentCreateParams.PaymentMethodData.Qris build() { + return new PaymentIntentCreateParams.PaymentMethodData.Qris(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 PaymentIntentCreateParams.PaymentMethodData.Qris#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Qris#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 + @EqualsAndHashCode(callSuper = false) + public static class RadarOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A Radar Session is a snapshot of + * the browser metadata and device details that help Radar make more accurate predictions on + * your payments. + */ + @SerializedName("session") + String session; + + private RadarOptions(Map extraParams, String session) { + this.extraParams = extraParams; + this.session = session; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String session; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.RadarOptions build() { + return new PaymentIntentCreateParams.PaymentMethodData.RadarOptions( + this.extraParams, this.session); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.RadarOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.RadarOptions#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A Radar Session is a snapshot + * of the browser metadata and device details that help Radar make more accurate predictions + * on your payments. + */ + public Builder setSession(String session) { + this.session = session; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rechnung { + /** Required. Customer's date of birth */ + @SerializedName("dob") + Dob dob; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Rechnung(Dob dob, Map extraParams) { + this.dob = dob; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Dob dob; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Rechnung build() { + return new PaymentIntentCreateParams.PaymentMethodData.Rechnung( + this.dob, this.extraParams); + } + + /** Required. Customer's date of birth */ + public Builder setDob(PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob dob) { + this.dob = dob; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Rechnung#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Rechnung#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Dob { + /** Required. The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of birth. */ + @SerializedName("year") + Long year; + + private Dob(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob build() { + return new PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Rechnung.Dob#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private RevolutPay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.RevolutPay build() { + return new PaymentIntentCreateParams.PaymentMethodData.RevolutPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.RevolutPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.RevolutPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SamsungPay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.SamsungPay build() { + return new PaymentIntentCreateParams.PaymentMethodData.SamsungPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SamsungPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SamsungPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Satispay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Satispay(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 PaymentIntentCreateParams.PaymentMethodData.Satispay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Satispay(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 PaymentIntentCreateParams.PaymentMethodData.Satispay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Satispay#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 + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. IBAN of the bank account. */ + @SerializedName("iban") + String iban; + + private SepaDebit(Map extraParams, String iban) { + this.extraParams = extraParams; + this.iban = iban; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String iban; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.SepaDebit build() { + return new PaymentIntentCreateParams.PaymentMethodData.SepaDebit( + this.extraParams, this.iban); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SepaDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.SepaDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. IBAN of the bank account. */ + public Builder setIban(String iban) { + this.iban = iban; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shopeepay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Shopeepay(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 PaymentIntentCreateParams.PaymentMethodData.Shopeepay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Shopeepay(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 PaymentIntentCreateParams.PaymentMethodData.Shopeepay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Shopeepay#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 + @EqualsAndHashCode(callSuper = false) + public static class Sofort { + /** + * Required. Two-letter ISO code representing the country the bank account is + * located in. + */ + @SerializedName("country") + Country country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Sofort(Country country, Map extraParams) { + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Country country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Sofort build() { + return new PaymentIntentCreateParams.PaymentMethodData.Sofort( + this.country, this.extraParams); + } + + /** + * Required. Two-letter ISO code representing the country the bank account + * is located in. + */ + public Builder setCountry( + PaymentIntentCreateParams.PaymentMethodData.Sofort.Country country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Sofort#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Sofort#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Country implements ApiRequestParams.EnumParam { + @SerializedName("AT") + AT("AT"), + + @SerializedName("BE") + BE("BE"), + + @SerializedName("DE") + DE("DE"), + + @SerializedName("ES") + ES("ES"), + + @SerializedName("IT") + IT("IT"), + + @SerializedName("NL") + NL("NL"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Country(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeBalance { + /** The connected account ID whose Stripe balance to use as the source of payment. */ + @SerializedName("account") + String account; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 source_type + * of the balance + */ + @SerializedName("source_type") + SourceType sourceType; + + private StripeBalance( + String account, Map extraParams, SourceType sourceType) { + this.account = account; + this.extraParams = extraParams; + this.sourceType = sourceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String account; + + private Map extraParams; + + private SourceType sourceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.StripeBalance build() { + return new PaymentIntentCreateParams.PaymentMethodData.StripeBalance( + this.account, this.extraParams, this.sourceType); + } + + /** The connected account ID whose Stripe balance to use as the source of payment. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.StripeBalance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.StripeBalance#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 source_type + * of the balance + */ + public Builder setSourceType( + PaymentIntentCreateParams.PaymentMethodData.StripeBalance.SourceType sourceType) { + this.sourceType = sourceType; + return this; + } + } + + public enum SourceType implements ApiRequestParams.EnumParam { + @SerializedName("bank_account") + BANK_ACCOUNT("bank_account"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("fpx") + FPX("fpx"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SourceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Swish { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Swish(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Swish build() { + return new PaymentIntentCreateParams.PaymentMethodData.Swish(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Swish#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Swish#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Twint { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Twint(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Twint build() { + return new PaymentIntentCreateParams.PaymentMethodData.Twint(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Twint#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Twint#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount { + /** Account holder type: individual or company. */ + @SerializedName("account_holder_type") + AccountHolderType accountHolderType; + + /** Account number of the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Account type: checkings or savings. Defaults to checking if omitted. */ + @SerializedName("account_type") + AccountType accountType; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The ID of a Financial Connections Account to use as a payment method. */ + @SerializedName("financial_connections_account") + String financialConnectionsAccount; + + /** Routing number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + + private UsBankAccount( + AccountHolderType accountHolderType, + String accountNumber, + AccountType accountType, + Map extraParams, + String financialConnectionsAccount, + String routingNumber) { + this.accountHolderType = accountHolderType; + this.accountNumber = accountNumber; + this.accountType = accountType; + this.extraParams = extraParams; + this.financialConnectionsAccount = financialConnectionsAccount; + this.routingNumber = routingNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AccountHolderType accountHolderType; + + private String accountNumber; + + private AccountType accountType; + + private Map extraParams; + + private String financialConnectionsAccount; + + private String routingNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.UsBankAccount build() { + return new PaymentIntentCreateParams.PaymentMethodData.UsBankAccount( + this.accountHolderType, + this.accountNumber, + this.accountType, + this.extraParams, + this.financialConnectionsAccount, + this.routingNumber); + } + + /** Account holder type: individual or company. */ + public Builder setAccountHolderType( + PaymentIntentCreateParams.PaymentMethodData.UsBankAccount.AccountHolderType + accountHolderType) { + this.accountHolderType = accountHolderType; + return this; + } + + /** Account number of the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Account type: checkings or savings. Defaults to checking if omitted. */ + public Builder setAccountType( + PaymentIntentCreateParams.PaymentMethodData.UsBankAccount.AccountType accountType) { + this.accountType = accountType; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.UsBankAccount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.UsBankAccount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The ID of a Financial Connections Account to use as a payment method. */ + public Builder setFinancialConnectionsAccount(String financialConnectionsAccount) { + this.financialConnectionsAccount = financialConnectionsAccount; + return this; + } + + /** Routing number of the bank account. */ + public Builder setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + } + + public enum AccountHolderType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("individual") + INDIVIDUAL("individual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountHolderType(String value) { + this.value = value; + } + } + + public enum AccountType implements ApiRequestParams.EnumParam { + @SerializedName("checking") + CHECKING("checking"), + + @SerializedName("savings") + SAVINGS("savings"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class WechatPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private WechatPay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.WechatPay build() { + return new PaymentIntentCreateParams.PaymentMethodData.WechatPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.WechatPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.WechatPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Zip { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Zip(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Zip build() { + return new PaymentIntentCreateParams.PaymentMethodData.Zip(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Zip#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Zip#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum AllowRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowRedisplay(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions { + /** + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the ACSS + * Debit payment method options. + */ + @SerializedName("acss_debit") + Object acssDebit; + + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + @SerializedName("affirm") + Object affirm; + + /** + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. + */ + @SerializedName("afterpay_clearpay") + Object afterpayClearpay; + + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + @SerializedName("alipay") + Object alipay; + + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + @SerializedName("alma") + Object alma; + + /** + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. + */ + @SerializedName("amazon_pay") + Object amazonPay; + + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the AU + * BECS Direct Debit payment method options. + */ + @SerializedName("au_becs_debit") + Object auBecsDebit; + + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the BACS + * Debit payment method options. + */ + @SerializedName("bacs_debit") + Object bacsDebit; + + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + @SerializedName("bancontact") + Object bancontact; + + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + @SerializedName("billie") + Object billie; + + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + @SerializedName("blik") + Object blik; + + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + @SerializedName("boleto") + Object boleto; + + /** Configuration for any card payments attempted on this PaymentIntent. */ + @SerializedName("card") + Object card; + + /** + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + @SerializedName("card_present") + Object cardPresent; + + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App + * Pay payment method options. + */ + @SerializedName("cashapp") + Object cashapp; + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + @SerializedName("crypto") + Object crypto; + + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the + * customer balance payment method options. + */ + @SerializedName("customer_balance") + Object customerBalance; + + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS payment + * method options. + */ + @SerializedName("eps") + Object eps; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment + * method options. + */ + @SerializedName("fpx") + Object fpx; + + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay + * payment method options. + */ + @SerializedName("giropay") + Object giropay; + + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + @SerializedName("gopay") + Object gopay; + + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay + * payment method options. + */ + @SerializedName("grabpay") + Object grabpay; + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the + * Indonesia Bank Transfer payment method options. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + @SerializedName("ideal") + Object ideal; + + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + @SerializedName("interac_present") + Object interacPresent; + + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the Kakao + * Pay payment method options. + */ + @SerializedName("kakao_pay") + Object kakaoPay; + + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + @SerializedName("klarna") + Object klarna; + + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini + * payment method options. + */ + @SerializedName("konbini") + Object konbini; + + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR Card + * payment method options. + */ + @SerializedName("kr_card") + Object krCard; + + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + @SerializedName("link") + Object link; + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + @SerializedName("mobilepay") + Object mobilepay; + + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + @SerializedName("multibanco") + Object multibanco; + + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the Naver + * Pay payment method options. + */ + @SerializedName("naver_pay") + Object naverPay; + + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about the + * NZ BECS Direct Debit payment method options. + */ + @SerializedName("nz_bank_account") + Object nzBankAccount; + + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + @SerializedName("oxxo") + Object oxxo; + + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + @SerializedName("p24") + Object p24; + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; + + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + @SerializedName("payco") + Object payco; + + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + @SerializedName("paynow") + Object paynow; + + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + @SerializedName("paypal") + Object paypal; + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Object payto; + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Object pix; + + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + @SerializedName("promptpay") + Object promptpay; + + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + @SerializedName("qris") + Object qris; + + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + @SerializedName("rechnung") + Object rechnung; + + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + @SerializedName("revolut_pay") + Object revolutPay; + + /** + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. + */ + @SerializedName("samsung_pay") + Object samsungPay; + + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + @SerializedName("satispay") + Object satispay; + + /** + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the SEPA + * Debit payment method options. + */ + @SerializedName("sepa_debit") + Object sepaDebit; + + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + @SerializedName("shopeepay") + Object shopeepay; + + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + @SerializedName("sofort") + Object sofort; + + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + @SerializedName("stripe_balance") + Object stripeBalance; + + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + @SerializedName("swish") + Object swish; + + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + @SerializedName("twint") + Object twint; + + /** + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the + * US bank account payment method options. + */ + @SerializedName("us_bank_account") + Object usBankAccount; + + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + @SerializedName("wechat_pay") + Object wechatPay; + + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment + * method options. + */ + @SerializedName("zip") + Object zip; + + private PaymentMethodOptions( + Object acssDebit, + Object affirm, + Object afterpayClearpay, + Object alipay, + Object alma, + Object amazonPay, + Object auBecsDebit, + Object bacsDebit, + Object bancontact, + Object billie, + Object blik, + Object boleto, + Object card, + Object cardPresent, + Object cashapp, + Object crypto, + Object customerBalance, + Object eps, + Map extraParams, + Object fpx, + Object giropay, + Object gopay, + Object grabpay, + Object idBankTransfer, + Object ideal, + Object interacPresent, + Object kakaoPay, + Object klarna, + Object konbini, + Object krCard, + Object link, + Object mbWay, + Object mobilepay, + Object multibanco, + Object naverPay, + Object nzBankAccount, + Object oxxo, + Object p24, + Object payByBank, + Object payco, + Object paynow, + Object paypal, + Object paypay, + Object payto, + Object pix, + Object promptpay, + Object qris, + Object rechnung, + Object revolutPay, + Object samsungPay, + Object satispay, + Object sepaDebit, + Object shopeepay, + Object sofort, + Object stripeBalance, + Object swish, + Object twint, + Object usBankAccount, + Object wechatPay, + Object zip) { + this.acssDebit = acssDebit; + this.affirm = affirm; + this.afterpayClearpay = afterpayClearpay; + this.alipay = alipay; + this.alma = alma; + this.amazonPay = amazonPay; + this.auBecsDebit = auBecsDebit; + this.bacsDebit = bacsDebit; + this.bancontact = bancontact; + this.billie = billie; + this.blik = blik; + this.boleto = boleto; + this.card = card; + this.cardPresent = cardPresent; + this.cashapp = cashapp; + this.crypto = crypto; + this.customerBalance = customerBalance; + this.eps = eps; + this.extraParams = extraParams; + this.fpx = fpx; + this.giropay = giropay; + this.gopay = gopay; + this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; + this.ideal = ideal; + this.interacPresent = interacPresent; + this.kakaoPay = kakaoPay; + this.klarna = klarna; + this.konbini = konbini; + this.krCard = krCard; + this.link = link; + this.mbWay = mbWay; + this.mobilepay = mobilepay; + this.multibanco = multibanco; + this.naverPay = naverPay; + this.nzBankAccount = nzBankAccount; + this.oxxo = oxxo; + this.p24 = p24; + this.payByBank = payByBank; + this.payco = payco; + this.paynow = paynow; + this.paypal = paypal; + this.paypay = paypay; + this.payto = payto; + this.pix = pix; + this.promptpay = promptpay; + this.qris = qris; + this.rechnung = rechnung; + this.revolutPay = revolutPay; + this.samsungPay = samsungPay; + this.satispay = satispay; + this.sepaDebit = sepaDebit; + this.shopeepay = shopeepay; + this.sofort = sofort; + this.stripeBalance = stripeBalance; + this.swish = swish; + this.twint = twint; + this.usBankAccount = usBankAccount; + this.wechatPay = wechatPay; + this.zip = zip; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object acssDebit; + + private Object affirm; + + private Object afterpayClearpay; + + private Object alipay; + + private Object alma; + + private Object amazonPay; + + private Object auBecsDebit; + + private Object bacsDebit; + + private Object bancontact; + + private Object billie; + + private Object blik; + + private Object boleto; + + private Object card; + + private Object cardPresent; + + private Object cashapp; + + private Object crypto; + + private Object customerBalance; + + private Object eps; + + private Map extraParams; + + private Object fpx; + + private Object giropay; + + private Object gopay; + + private Object grabpay; + + private Object idBankTransfer; + + private Object ideal; + + private Object interacPresent; + + private Object kakaoPay; + + private Object klarna; + + private Object konbini; + + private Object krCard; + + private Object link; + + private Object mbWay; + + private Object mobilepay; + + private Object multibanco; + + private Object naverPay; + + private Object nzBankAccount; + + private Object oxxo; + + private Object p24; + + private Object payByBank; + + private Object payco; + + private Object paynow; + + private Object paypal; + + private Object paypay; + + private Object payto; + + private Object pix; + + private Object promptpay; + + private Object qris; + + private Object rechnung; + + private Object revolutPay; + + private Object samsungPay; + + private Object satispay; + + private Object sepaDebit; + + private Object shopeepay; + + private Object sofort; + + private Object stripeBalance; + + private Object swish; + + private Object twint; + + private Object usBankAccount; + + private Object wechatPay; + + private Object zip; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions build() { + return new PaymentIntentCreateParams.PaymentMethodOptions( + this.acssDebit, + this.affirm, + this.afterpayClearpay, + this.alipay, + this.alma, + this.amazonPay, + this.auBecsDebit, + this.bacsDebit, + this.bancontact, + this.billie, + this.blik, + this.boleto, + this.card, + this.cardPresent, + this.cashapp, + this.crypto, + this.customerBalance, + this.eps, + this.extraParams, + this.fpx, + this.giropay, + this.gopay, + this.grabpay, + this.idBankTransfer, + this.ideal, + this.interacPresent, + this.kakaoPay, + this.klarna, + this.konbini, + this.krCard, + this.link, + this.mbWay, + this.mobilepay, + this.multibanco, + this.naverPay, + this.nzBankAccount, + this.oxxo, + this.p24, + this.payByBank, + this.payco, + this.paynow, + this.paypal, + this.paypay, + this.payto, + this.pix, + this.promptpay, + this.qris, + this.rechnung, + this.revolutPay, + this.samsungPay, + this.satispay, + this.sepaDebit, + this.shopeepay, + this.sofort, + this.stripeBalance, + this.swish, + this.twint, + this.usBankAccount, + this.wechatPay, + this.zip); + } + + /** + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the + * ACSS Debit payment method options. + */ + public Builder setAcssDebit( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit acssDebit) { + this.acssDebit = acssDebit; + return this; + } + + /** + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the + * ACSS Debit payment method options. + */ + public Builder setAcssDebit(EmptyParam acssDebit) { + this.acssDebit = acssDebit; + return this; + } + + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + public Builder setAffirm(PaymentIntentCreateParams.PaymentMethodOptions.Affirm affirm) { + this.affirm = affirm; + return this; + } + + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + public Builder setAffirm(EmptyParam affirm) { + this.affirm = affirm; + return this; + } + + /** + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. + */ + public Builder setAfterpayClearpay( + PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; + } + + /** + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. + */ + public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; + } + + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + public Builder setAlipay(PaymentIntentCreateParams.PaymentMethodOptions.Alipay alipay) { + this.alipay = alipay; + return this; + } + + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + public Builder setAlipay(EmptyParam alipay) { + this.alipay = alipay; + return this; + } + + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + public Builder setAlma(PaymentIntentCreateParams.PaymentMethodOptions.Alma alma) { + this.alma = alma; + return this; + } + + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + public Builder setAlma(EmptyParam alma) { + this.alma = alma; + return this; + } + + /** + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. + */ + public Builder setAmazonPay( + PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay amazonPay) { + this.amazonPay = amazonPay; + return this; + } + + /** + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. + */ + public Builder setAmazonPay(EmptyParam amazonPay) { + this.amazonPay = amazonPay; + return this; + } + + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the + * AU BECS Direct Debit payment method options. + */ + public Builder setAuBecsDebit( + PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) { + this.auBecsDebit = auBecsDebit; + return this; + } + + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the + * AU BECS Direct Debit payment method options. + */ + public Builder setAuBecsDebit(EmptyParam auBecsDebit) { + this.auBecsDebit = auBecsDebit; + return this; + } + + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. + */ + public Builder setBacsDebit( + PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit bacsDebit) { + this.bacsDebit = bacsDebit; + return this; + } + + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. + */ + public Builder setBacsDebit(EmptyParam bacsDebit) { + this.bacsDebit = bacsDebit; + return this; + } + + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + public Builder setBancontact( + PaymentIntentCreateParams.PaymentMethodOptions.Bancontact bancontact) { + this.bancontact = bancontact; + return this; + } + + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + public Builder setBancontact(EmptyParam bancontact) { + this.bancontact = bancontact; + return this; + } + + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + public Builder setBillie(PaymentIntentCreateParams.PaymentMethodOptions.Billie billie) { + this.billie = billie; + return this; + } + + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + public Builder setBillie(EmptyParam billie) { + this.billie = billie; + return this; + } + + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + public Builder setBlik(PaymentIntentCreateParams.PaymentMethodOptions.Blik blik) { + this.blik = blik; + return this; + } + + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + public Builder setBlik(EmptyParam blik) { + this.blik = blik; + return this; + } + + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + public Builder setBoleto(PaymentIntentCreateParams.PaymentMethodOptions.Boleto boleto) { + this.boleto = boleto; + return this; + } + + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + public Builder setBoleto(EmptyParam boleto) { + this.boleto = boleto; + return this; + } + + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(PaymentIntentCreateParams.PaymentMethodOptions.Card card) { + this.card = card; + return this; + } + + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(EmptyParam card) { + this.card = card; + return this; + } + + /** + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + public Builder setCardPresent( + PaymentIntentCreateParams.PaymentMethodOptions.CardPresent cardPresent) { + this.cardPresent = cardPresent; + return this; + } + + /** + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + public Builder setCardPresent(EmptyParam cardPresent) { + this.cardPresent = cardPresent; + return this; + } + + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash + * App Pay payment method options. + */ + public Builder setCashapp(PaymentIntentCreateParams.PaymentMethodOptions.Cashapp cashapp) { + this.cashapp = cashapp; + return this; + } + + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash + * App Pay payment method options. + */ + public Builder setCashapp(EmptyParam cashapp) { + this.cashapp = cashapp; + return this; + } + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(PaymentIntentCreateParams.PaymentMethodOptions.Crypto crypto) { + this.crypto = crypto; + return this; + } + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(EmptyParam crypto) { + this.crypto = crypto; + return this; + } + + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about + * the customer balance payment method options. + */ + public Builder setCustomerBalance( + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance customerBalance) { + this.customerBalance = customerBalance; + return this; + } + + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about + * the customer balance payment method options. + */ + public Builder setCustomerBalance(EmptyParam customerBalance) { + this.customerBalance = customerBalance; + return this; + } + + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS + * payment method options. + */ + public Builder setEps(PaymentIntentCreateParams.PaymentMethodOptions.Eps eps) { + this.eps = eps; + return this; + } + + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS + * payment method options. + */ + public Builder setEps(EmptyParam eps) { + this.eps = eps; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentCreateParams.PaymentMethodOptions#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX + * payment method options. + */ + public Builder setFpx(PaymentIntentCreateParams.PaymentMethodOptions.Fpx fpx) { + this.fpx = fpx; + return this; + } + + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX + * payment method options. + */ + public Builder setFpx(EmptyParam fpx) { + this.fpx = fpx; + return this; + } + + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the + * Giropay payment method options. + */ + public Builder setGiropay(PaymentIntentCreateParams.PaymentMethodOptions.Giropay giropay) { + this.giropay = giropay; + return this; + } + + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the + * Giropay payment method options. + */ + public Builder setGiropay(EmptyParam giropay) { + this.giropay = giropay; + return this; + } + + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + public Builder setGopay(PaymentIntentCreateParams.PaymentMethodOptions.Gopay gopay) { + this.gopay = gopay; + return this; + } + + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + public Builder setGopay(EmptyParam gopay) { + this.gopay = gopay; + return this; + } + + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the + * Grabpay payment method options. + */ + public Builder setGrabpay(PaymentIntentCreateParams.PaymentMethodOptions.Grabpay grabpay) { + this.grabpay = grabpay; + return this; + } + + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the + * Grabpay payment method options. + */ + public Builder setGrabpay(EmptyParam grabpay) { + this.grabpay = grabpay; + return this; + } + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer( + PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + public Builder setIdeal(PaymentIntentCreateParams.PaymentMethodOptions.Ideal ideal) { + this.ideal = ideal; + return this; + } + + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + public Builder setIdeal(EmptyParam ideal) { + this.ideal = ideal; + return this; + } + + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about + * the Card Present payment method options. + */ + public Builder setInteracPresent( + PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent interacPresent) { + this.interacPresent = interacPresent; + return this; + } + + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about + * the Card Present payment method options. + */ + public Builder setInteracPresent(EmptyParam interacPresent) { + this.interacPresent = interacPresent; + return this; + } + + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the + * Kakao Pay payment method options. + */ + public Builder setKakaoPay(PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay kakaoPay) { + this.kakaoPay = kakaoPay; + return this; + } + + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the + * Kakao Pay payment method options. + */ + public Builder setKakaoPay(EmptyParam kakaoPay) { + this.kakaoPay = kakaoPay; + return this; + } + + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(PaymentIntentCreateParams.PaymentMethodOptions.Klarna klarna) { + this.klarna = klarna; + return this; + } + + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(EmptyParam klarna) { + this.klarna = klarna; + return this; + } + + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the + * Konbini payment method options. + */ + public Builder setKonbini(PaymentIntentCreateParams.PaymentMethodOptions.Konbini konbini) { + this.konbini = konbini; + return this; + } + + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the + * Konbini payment method options. + */ + public Builder setKonbini(EmptyParam konbini) { + this.konbini = konbini; + return this; + } + + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR + * Card payment method options. + */ + public Builder setKrCard(PaymentIntentCreateParams.PaymentMethodOptions.KrCard krCard) { + this.krCard = krCard; + return this; + } + + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR + * Card payment method options. + */ + public Builder setKrCard(EmptyParam krCard) { + this.krCard = krCard; + return this; + } + + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + public Builder setLink(PaymentIntentCreateParams.PaymentMethodOptions.Link link) { + this.link = link; + return this; + } + + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + public Builder setLink(EmptyParam link) { + this.link = link; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentCreateParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + public Builder setMobilepay( + PaymentIntentCreateParams.PaymentMethodOptions.Mobilepay mobilepay) { + this.mobilepay = mobilepay; + return this; + } + + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + public Builder setMobilepay(EmptyParam mobilepay) { + this.mobilepay = mobilepay; + return this; + } + + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + public Builder setMultibanco( + PaymentIntentCreateParams.PaymentMethodOptions.Multibanco multibanco) { + this.multibanco = multibanco; + return this; + } + + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + public Builder setMultibanco(EmptyParam multibanco) { + this.multibanco = multibanco; + return this; + } + + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the + * Naver Pay payment method options. + */ + public Builder setNaverPay(PaymentIntentCreateParams.PaymentMethodOptions.NaverPay naverPay) { + this.naverPay = naverPay; + return this; + } + + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the + * Naver Pay payment method options. + */ + public Builder setNaverPay(EmptyParam naverPay) { + this.naverPay = naverPay; + return this; + } + + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about + * the NZ BECS Direct Debit payment method options. + */ + public Builder setNzBankAccount( + PaymentIntentCreateParams.PaymentMethodOptions.NzBankAccount nzBankAccount) { + this.nzBankAccount = nzBankAccount; + return this; + } + + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about + * the NZ BECS Direct Debit payment method options. + */ + public Builder setNzBankAccount(EmptyParam nzBankAccount) { + this.nzBankAccount = nzBankAccount; + return this; + } + + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + public Builder setOxxo(PaymentIntentCreateParams.PaymentMethodOptions.Oxxo oxxo) { + this.oxxo = oxxo; + return this; + } + + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + public Builder setOxxo(EmptyParam oxxo) { + this.oxxo = oxxo; + return this; + } + + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + public Builder setP24(PaymentIntentCreateParams.PaymentMethodOptions.P24 p24) { + this.p24 = p24; + return this; + } + + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + public Builder setP24(EmptyParam p24) { + this.p24 = p24; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentCreateParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + public Builder setPayco(PaymentIntentCreateParams.PaymentMethodOptions.Payco payco) { + this.payco = payco; + return this; + } + + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + public Builder setPayco(EmptyParam payco) { + this.payco = payco; + return this; + } + + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + public Builder setPaynow(PaymentIntentCreateParams.PaymentMethodOptions.Paynow paynow) { + this.paynow = paynow; + return this; + } + + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + public Builder setPaynow(EmptyParam paynow) { + this.paynow = paynow; + return this; + } + + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + public Builder setPaypal(PaymentIntentCreateParams.PaymentMethodOptions.Paypal paypal) { + this.paypal = paypal; + return this; + } + + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + public Builder setPaypal(EmptyParam paypal) { + this.paypal = paypal; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentCreateParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(PaymentIntentCreateParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(PaymentIntentCreateParams.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + public Builder setPromptpay( + PaymentIntentCreateParams.PaymentMethodOptions.Promptpay promptpay) { + this.promptpay = promptpay; + return this; + } + + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + public Builder setPromptpay(EmptyParam promptpay) { + this.promptpay = promptpay; + return this; + } + + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + public Builder setQris(PaymentIntentCreateParams.PaymentMethodOptions.Qris qris) { + this.qris = qris; + return this; + } + + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + public Builder setQris(EmptyParam qris) { + this.qris = qris; + return this; + } + + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + public Builder setRechnung(PaymentIntentCreateParams.PaymentMethodOptions.Rechnung rechnung) { + this.rechnung = rechnung; + return this; + } + + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + public Builder setRechnung(EmptyParam rechnung) { + this.rechnung = rechnung; + return this; + } + + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + public Builder setRevolutPay( + PaymentIntentCreateParams.PaymentMethodOptions.RevolutPay revolutPay) { + this.revolutPay = revolutPay; + return this; + } + + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + public Builder setRevolutPay(EmptyParam revolutPay) { + this.revolutPay = revolutPay; + return this; + } + + /** + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. + */ + public Builder setSamsungPay( + PaymentIntentCreateParams.PaymentMethodOptions.SamsungPay samsungPay) { + this.samsungPay = samsungPay; + return this; + } + + /** + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. + */ + public Builder setSamsungPay(EmptyParam samsungPay) { + this.samsungPay = samsungPay; + return this; + } + + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + public Builder setSatispay(PaymentIntentCreateParams.PaymentMethodOptions.Satispay satispay) { + this.satispay = satispay; + return this; + } + + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + public Builder setSatispay(EmptyParam satispay) { + this.satispay = satispay; + return this; + } + + /** + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the + * SEPA Debit payment method options. + */ + public Builder setSepaDebit( + PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; + return this; + } + + /** + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the + * SEPA Debit payment method options. + */ + public Builder setSepaDebit(EmptyParam sepaDebit) { + this.sepaDebit = sepaDebit; + return this; + } + + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + public Builder setShopeepay( + PaymentIntentCreateParams.PaymentMethodOptions.Shopeepay shopeepay) { + this.shopeepay = shopeepay; + return this; + } + + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + public Builder setShopeepay(EmptyParam shopeepay) { + this.shopeepay = shopeepay; + return this; + } + + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + public Builder setSofort(PaymentIntentCreateParams.PaymentMethodOptions.Sofort sofort) { + this.sofort = sofort; + return this; + } + + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + public Builder setSofort(EmptyParam sofort) { + this.sofort = sofort; + return this; + } + + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + public Builder setStripeBalance( + PaymentIntentCreateParams.PaymentMethodOptions.StripeBalance stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } + + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + public Builder setStripeBalance(EmptyParam stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } + + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + public Builder setSwish(PaymentIntentCreateParams.PaymentMethodOptions.Swish swish) { + this.swish = swish; + return this; + } + + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + public Builder setSwish(EmptyParam swish) { + this.swish = swish; + return this; + } + + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + public Builder setTwint(PaymentIntentCreateParams.PaymentMethodOptions.Twint twint) { + this.twint = twint; + return this; + } + + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + public Builder setTwint(EmptyParam twint) { + this.twint = twint; + return this; + } + + /** + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about + * the US bank account payment method options. + */ + public Builder setUsBankAccount( + PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { + this.usBankAccount = usBankAccount; + return this; + } + + /** + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about + * the US bank account payment method options. + */ + public Builder setUsBankAccount(EmptyParam usBankAccount) { + this.usBankAccount = usBankAccount; + return this; + } + + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + public Builder setWechatPay( + PaymentIntentCreateParams.PaymentMethodOptions.WechatPay wechatPay) { + this.wechatPay = wechatPay; + return this; + } + + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + public Builder setWechatPay(EmptyParam wechatPay) { + this.wechatPay = wechatPay; + return this; + } + + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip + * payment method options. + */ + public Builder setZip(PaymentIntentCreateParams.PaymentMethodOptions.Zip zip) { + this.zip = zip; + return this; + } + + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip + * payment method options. + */ + public Builder setZip(EmptyParam zip) { + this.zip = zip; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + /** Bank account verification method. */ + @SerializedName("verification_method") + VerificationMethod verificationMethod; + + private AcssDebit( + Map extraParams, + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, + VerificationMethod verificationMethod) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; + this.verificationMethod = verificationMethod; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private String targetDate; + + private VerificationMethod verificationMethod; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit( + this.extraParams, + this.mandateOptions, + this.setupFutureUsage, + this.targetDate, + this.verificationMethod); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** Bank account verification method. */ + public Builder setVerificationMethod( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod + verificationMethod) { + this.verificationMethod = verificationMethod; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + @SerializedName("custom_mandate_url") + Object customMandateUrl; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + @SerializedName("interval_description") + String intervalDescription; + + /** Payment schedule for the mandate. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + /** Transaction type of the mandate. */ + @SerializedName("transaction_type") + TransactionType transactionType; + + private MandateOptions( + Object customMandateUrl, + Map extraParams, + String intervalDescription, + PaymentSchedule paymentSchedule, + TransactionType transactionType) { + this.customMandateUrl = customMandateUrl; + this.extraParams = extraParams; + this.intervalDescription = intervalDescription; + this.paymentSchedule = paymentSchedule; + this.transactionType = transactionType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object customMandateUrl; + + private Map extraParams; + + private String intervalDescription; + + private PaymentSchedule paymentSchedule; + + private TransactionType transactionType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions( + this.customMandateUrl, + this.extraParams, + this.intervalDescription, + this.paymentSchedule, + this.transactionType); + } + + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + public Builder setCustomMandateUrl(String customMandateUrl) { + this.customMandateUrl = customMandateUrl; + return this; + } + + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + public Builder setCustomMandateUrl(EmptyParam customMandateUrl) { + this.customMandateUrl = customMandateUrl; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + public Builder setIntervalDescription(String intervalDescription) { + this.intervalDescription = intervalDescription; + return this; + } + + /** Payment schedule for the mandate. */ + public Builder setPaymentSchedule( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** Transaction type of the mandate. */ + public Builder setTransactionType( + PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions + .TransactionType + transactionType) { + this.transactionType = transactionType; + return this; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("combined") + COMBINED("combined"), + + @SerializedName("interval") + INTERVAL("interval"), + + @SerializedName("sporadic") + SPORADIC("sporadic"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("personal") + PERSONAL("personal"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionType(String value) { + this.value = value; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + + public enum VerificationMethod implements ApiRequestParams.EnumParam { + @SerializedName("automatic") + AUTOMATIC("automatic"), + + @SerializedName("instant") + INSTANT("instant"), + + @SerializedName("microdeposits") + MICRODEPOSITS("microdeposits"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VerificationMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affirm { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Preferred language of the Affirm authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + String preferredLocale; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Affirm( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + String preferredLocale, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.preferredLocale = preferredLocale; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private String preferredLocale; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Affirm build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Affirm( + this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Affirm#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Affirm#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale(String preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Affirm.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpay { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. + */ + @SerializedName("reference") + String reference; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private AfterpayClearpay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + String reference, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.reference = reference; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private String reference; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay( + this.captureMethod, this.extraParams, this.reference, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alipay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Alipay(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Alipay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Alipay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Alipay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alma { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Alma build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Alma( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alma#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Alma#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 CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private AmazonPay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + private AuBecsDebit( + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private String targetDate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit( + this.extraParams, this.setupFutureUsage, this.targetDate); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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 PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit.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; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebit { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * 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; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + private BacsDebit( + Map extraParams, + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private String targetDate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit( + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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 PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.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; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special characters: + * '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + @SerializedName("reference_prefix") + Object referencePrefix; + + private MandateOptions(Map extraParams, Object referencePrefix) { + this.extraParams = extraParams; + this.referencePrefix = referencePrefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object referencePrefix; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions( + this.extraParams, this.referencePrefix); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special + * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + public Builder setReferencePrefix(String referencePrefix) { + this.referencePrefix = referencePrefix; + return this; + } + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special + * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + public Builder setReferencePrefix(EmptyParam referencePrefix) { + this.referencePrefix = referencePrefix; + return this; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Bancontact { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ + @SerializedName("preferred_language") + PreferredLanguage preferredLanguage; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Bancontact( + Map extraParams, + PreferredLanguage preferredLanguage, + ApiRequestParams.EnumParam setupFutureUsage) { + this.extraParams = extraParams; + this.preferredLanguage = preferredLanguage; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PreferredLanguage preferredLanguage; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Bancontact build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Bancontact( + this.extraParams, this.preferredLanguage, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected + * to. + */ + public Builder setPreferredLanguage( + PaymentIntentCreateParams.PaymentMethodOptions.Bancontact.PreferredLanguage + preferredLanguage) { + this.preferredLanguage = preferredLanguage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Bancontact.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum PreferredLanguage implements ApiRequestParams.EnumParam { + @SerializedName("de") + DE("de"), + + @SerializedName("en") + EN("en"), + + @SerializedName("fr") + FR("fr"), + + @SerializedName("nl") + NL("nl"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLanguage(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billie { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Billie build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Billie( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Billie#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Billie#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 CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Blik { + /** + * The 6-digit BLIK code that a customer has generated using their banking application. Can + * only be set on confirmation. + */ + @SerializedName("code") + String code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Blik( + String code, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.code = code; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String code; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Blik build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Blik( + this.code, this.extraParams, this.setupFutureUsage); + } + + /** + * The 6-digit BLIK code that a customer has generated using their banking application. Can + * only be set on confirmation. + */ + public Builder setCode(String code) { + this.code = code; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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 PaymentIntentCreateParams.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Blik.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Boleto { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a + * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will + * expire on Wednesday at 23:59 America/Sao_Paulo time. + */ + @SerializedName("expires_after_days") + Long expiresAfterDays; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Boleto( + Long expiresAfterDays, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.expiresAfterDays = expiresAfterDays; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfterDays; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Boleto build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Boleto( + this.expiresAfterDays, this.extraParams, this.setupFutureUsage); + } + + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a + * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will + * expire on Wednesday at 23:59 America/Sao_Paulo time. + */ + public Builder setExpiresAfterDays(Long expiresAfterDays) { + this.expiresAfterDays = expiresAfterDays; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Boleto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Boleto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, the + * CVC value will be verified during the card payment attempt. This parameter can only be + * provided during confirmation. + */ + @SerializedName("cvc_token") + String cvcToken; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Installment configuration for payments attempted on this PaymentIntent. + * + *

For more information, see the installments integration guide. + */ + @SerializedName("installments") + Installments installments; + + /** Configuration options for setting up an eMandate for cards issued in India. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail + * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided + * during confirmation. + */ + @SerializedName("moto") + Boolean moto; + + /** + * Selected network to process this PaymentIntent on. Depends on the available networks of the + * card attached to the PaymentIntent. Can be only set confirm-time. + */ + @SerializedName("network") + Network network; + + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + @SerializedName("request_decremental_authorization") + RequestDecrementalAuthorization requestDecrementalAuthorization; + + /** + * Request ability to capture beyond the standard + * authorization validity window for this PaymentIntent. + */ + @SerializedName("request_extended_authorization") + RequestExtendedAuthorization requestExtendedAuthorization; + + /** + * Request ability to increment the + * authorization for this PaymentIntent. + */ + @SerializedName("request_incremental_authorization") + RequestIncrementalAuthorization requestIncrementalAuthorization; + + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + @SerializedName("request_multicapture") + RequestMulticapture requestMulticapture; + + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + @SerializedName("request_overcapture") + RequestOvercapture requestOvercapture; + + /** Request partial authorization on this PaymentIntent. */ + @SerializedName("request_partial_authorization") + RequestPartialAuthorization requestPartialAuthorization; + + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your + * customers for authentication based on risk level and other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. If not provided, this value defaults to {@code automatic}. Read our + * guide on manually + * requesting 3D Secure for more information on how this configuration interacts with + * Radar and our SCA Engine. + */ + @SerializedName("request_three_d_secure") + RequestThreeDSecure requestThreeDSecure; + + /** + * When enabled, using a card that is attached to a customer will require the CVC to be + * provided again (i.e. using the cvc_token parameter). + */ + @SerializedName("require_cvc_recollection") + Boolean requireCvcRecollection; + + /** + * 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; + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor + * that’s set on the account to form the complete statement descriptor. Maximum 22 characters. + * On card statements, the concatenation of both prefix and suffix (including + * separators) will appear truncated to 22 characters. + */ + @SerializedName("statement_descriptor_suffix_kana") + Object statementDescriptorSuffixKana; + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 + * characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + @SerializedName("statement_descriptor_suffix_kanji") + Object statementDescriptorSuffixKanji; + + /** + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. + */ + @SerializedName("statement_details") + Object statementDetails; + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. + */ + @SerializedName("three_d_secure") + ThreeDSecure threeDSecure; + + private Card( + ApiRequestParams.EnumParam captureMethod, + String cvcToken, + Map extraParams, + Installments installments, + MandateOptions mandateOptions, + Boolean moto, + Network network, + RequestDecrementalAuthorization requestDecrementalAuthorization, + RequestExtendedAuthorization requestExtendedAuthorization, + RequestIncrementalAuthorization requestIncrementalAuthorization, + RequestMulticapture requestMulticapture, + RequestOvercapture requestOvercapture, + RequestPartialAuthorization requestPartialAuthorization, + RequestThreeDSecure requestThreeDSecure, + Boolean requireCvcRecollection, + ApiRequestParams.EnumParam setupFutureUsage, + Object statementDescriptorSuffixKana, + Object statementDescriptorSuffixKanji, + Object statementDetails, + ThreeDSecure threeDSecure) { + this.captureMethod = captureMethod; + this.cvcToken = cvcToken; + this.extraParams = extraParams; + this.installments = installments; + this.mandateOptions = mandateOptions; + this.moto = moto; + this.network = network; + this.requestDecrementalAuthorization = requestDecrementalAuthorization; + this.requestExtendedAuthorization = requestExtendedAuthorization; + this.requestIncrementalAuthorization = requestIncrementalAuthorization; + this.requestMulticapture = requestMulticapture; + this.requestOvercapture = requestOvercapture; + this.requestPartialAuthorization = requestPartialAuthorization; + this.requestThreeDSecure = requestThreeDSecure; + this.requireCvcRecollection = requireCvcRecollection; + this.setupFutureUsage = setupFutureUsage; + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.statementDetails = statementDetails; + this.threeDSecure = threeDSecure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private String cvcToken; + + private Map extraParams; + + private Installments installments; + + private MandateOptions mandateOptions; + + private Boolean moto; + + private Network network; + + private RequestDecrementalAuthorization requestDecrementalAuthorization; + + private RequestExtendedAuthorization requestExtendedAuthorization; + + private RequestIncrementalAuthorization requestIncrementalAuthorization; + + private RequestMulticapture requestMulticapture; + + private RequestOvercapture requestOvercapture; + + private RequestPartialAuthorization requestPartialAuthorization; + + private RequestThreeDSecure requestThreeDSecure; + + private Boolean requireCvcRecollection; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private Object statementDescriptorSuffixKana; + + private Object statementDescriptorSuffixKanji; + + private Object statementDetails; + + private ThreeDSecure threeDSecure; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card( + this.captureMethod, + this.cvcToken, + this.extraParams, + this.installments, + this.mandateOptions, + this.moto, + this.network, + this.requestDecrementalAuthorization, + this.requestExtendedAuthorization, + this.requestIncrementalAuthorization, + this.requestMulticapture, + this.requestOvercapture, + this.requestPartialAuthorization, + this.requestThreeDSecure, + this.requireCvcRecollection, + this.setupFutureUsage, + this.statementDescriptorSuffixKana, + this.statementDescriptorSuffixKanji, + this.statementDetails, + this.threeDSecure); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, + * the CVC value will be verified during the card payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setCvcToken(String cvcToken) { + this.cvcToken = cvcToken; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Installment configuration for payments attempted on this PaymentIntent. + * + *

For more information, see the installments integration guide. + */ + public Builder setInstallments( + PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments installments) { + this.installments = installments; + return this; + } + + /** Configuration options for setting up an eMandate for cards issued in India. */ + public Builder setMandateOptions( + PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail + * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided + * during confirmation. + */ + public Builder setMoto(Boolean moto) { + this.moto = moto; + return this; + } + + /** + * Selected network to process this PaymentIntent on. Depends on the available networks of + * the card attached to the PaymentIntent. Can be only set confirm-time. + */ + public Builder setNetwork( + PaymentIntentCreateParams.PaymentMethodOptions.Card.Network network) { + this.network = network; + return this; + } + + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + public Builder setRequestDecrementalAuthorization( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization + requestDecrementalAuthorization) { + this.requestDecrementalAuthorization = requestDecrementalAuthorization; + return this; + } + + /** + * Request ability to capture beyond the + * standard authorization validity window for this PaymentIntent. + */ + public Builder setRequestExtendedAuthorization( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestExtendedAuthorization + requestExtendedAuthorization) { + this.requestExtendedAuthorization = requestExtendedAuthorization; + return this; + } + + /** + * Request ability to increment the + * authorization for this PaymentIntent. + */ + public Builder setRequestIncrementalAuthorization( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization + requestIncrementalAuthorization) { + this.requestIncrementalAuthorization = requestIncrementalAuthorization; + return this; + } + + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + public Builder setRequestMulticapture( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestMulticapture + requestMulticapture) { + this.requestMulticapture = requestMulticapture; + return this; + } + + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + public Builder setRequestOvercapture( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestOvercapture + requestOvercapture) { + this.requestOvercapture = requestOvercapture; + return this; + } + + /** Request partial authorization on this PaymentIntent. */ + public Builder setRequestPartialAuthorization( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestPartialAuthorization + requestPartialAuthorization) { + this.requestPartialAuthorization = requestPartialAuthorization; + return this; + } + + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your + * customers for authentication based on risk level and other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. If not provided, this value defaults to {@code automatic}. Read our + * guide on manually + * requesting 3D Secure for more information on how this configuration interacts with + * Radar and our SCA Engine. + */ + public Builder setRequestThreeDSecure( + PaymentIntentCreateParams.PaymentMethodOptions.Card.RequestThreeDSecure + requestThreeDSecure) { + this.requestThreeDSecure = requestThreeDSecure; + return this; + } + + /** + * When enabled, using a card that is attached to a customer will require the CVC to be + * provided again (i.e. using the cvc_token parameter). + */ + public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { + this.requireCvcRecollection = requireCvcRecollection; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Card.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; + } + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 22 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 22 characters. + */ + public Builder setStatementDescriptorSuffixKana(String statementDescriptorSuffixKana) { + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + return this; + } + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 22 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 22 characters. + */ + public Builder setStatementDescriptorSuffixKana(EmptyParam statementDescriptorSuffixKana) { + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + return this; + } + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 17 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + public Builder setStatementDescriptorSuffixKanji(String statementDescriptorSuffixKanji) { + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + return this; + } + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 17 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + public Builder setStatementDescriptorSuffixKanji( + EmptyParam statementDescriptorSuffixKanji) { + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + return this; + } + + /** + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. + */ + public Builder setStatementDetails( + PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails statementDetails) { + this.statementDetails = statementDetails; + return this; + } + + /** + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. + */ + public Builder setStatementDetails(EmptyParam statementDetails) { + this.statementDetails = statementDetails; + return this; + } + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. + */ + public Builder setThreeDSecure( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Installments { + /** + * Setting to true enables installments for this PaymentIntent. This will cause the response + * to contain a list of available installment plans. Setting to false will prevent any + * selected plan from applying to a charge. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The selected installment plan to use for this payment attempt. This parameter can only be + * provided during confirmation. + */ + @SerializedName("plan") + Object plan; + + private Installments(Boolean enabled, Map extraParams, Object plan) { + this.enabled = enabled; + this.extraParams = extraParams; + this.plan = plan; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Object plan; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments( + this.enabled, this.extraParams, this.plan); + } + + /** + * Setting to true enables installments for this PaymentIntent. This will cause the + * response to contain a list of available installment plans. Setting to false will + * prevent any selected plan from applying to a charge. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The selected installment plan to use for this payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setPlan( + PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan plan) { + this.plan = plan; + return this; + } + + /** + * The selected installment plan to use for this payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setPlan(EmptyParam plan) { + this.plan = plan; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Plan { + /** + * For {@code fixed_count} installment plans, this is required. It represents the number + * of installment payments your customer will make to their credit card. + */ + @SerializedName("count") + Long count; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * For {@code fixed_count} installment plans, this is required. It represents the interval + * between installment payments your customer will make to their credit card. One of + * {@code month}. + */ + @SerializedName("interval") + Interval interval; + + /** + * Required. Type of installment plan, one of {@code fixed_count}, {@code + * bonus}, or {@code revolving}. + */ + @SerializedName("type") + Type type; + + private Plan(Long count, Map extraParams, Interval interval, Type type) { + this.count = count; + this.extraParams = extraParams; + this.interval = interval; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long count; + + private Map extraParams; + + private Interval interval; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan( + this.count, this.extraParams, this.interval, this.type); + } + + /** + * For {@code fixed_count} installment plans, this is required. It represents the number + * of installment payments your customer will make to their credit card. + */ + public Builder setCount(Long count) { + this.count = count; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * For {@code fixed_count} installment plans, this is required. It represents the + * interval between installment payments your customer will make to their credit card. + * One of {@code month}. + */ + public Builder setInterval( + PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ + public Builder setType( + PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { + this.type = type; + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("month") + MONTH("month"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), + + @SerializedName("fixed_count") + FIXED_COUNT("fixed_count"), + + @SerializedName("revolving") + REVOLVING("revolving"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Required. Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, the + * {@code amount} param refers to the exact amount to be charged in future payments. If + * {@code maximum}, the amount charged can be up to the value passed for the {@code amount} + * param. + */ + @SerializedName("amount_type") + AmountType amountType; + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + @SerializedName("description") + String description; + + /** + * End date of the mandate or subscription. If not provided, the mandate will be active + * until canceled. If provided, end date should be after start date. + */ + @SerializedName("end_date") + Long endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Specifies payment frequency. One of {@code day}, {@code week}, + * {@code month}, {@code year}, or {@code sporadic}. + */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals between payments. For example, {@code interval=month} and {@code + * interval_count=3} indicates one payment every three months. Maximum of one year interval + * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code + * interval=sporadic}. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Required. Unique identifier for the mandate or subscription. */ + @SerializedName("reference") + String reference; + + /** + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. + */ + @SerializedName("start_date") + Long startDate; + + /** Specifies the type of mandates supported. Possible values are {@code india}. */ + @SerializedName("supported_types") + List + supportedTypes; + + private MandateOptions( + Long amount, + AmountType amountType, + String description, + Long endDate, + Map extraParams, + Interval interval, + Long intervalCount, + String reference, + Long startDate, + List + supportedTypes) { + this.amount = amount; + this.amountType = amountType; + this.description = description; + this.endDate = endDate; + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.reference = reference; + this.startDate = startDate; + this.supportedTypes = supportedTypes; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountType amountType; + + private String description; + + private Long endDate; + + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String reference; + + private Long startDate; + + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> + supportedTypes; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions( + this.amount, + this.amountType, + this.description, + this.endDate, + this.extraParams, + this.interval, + this.intervalCount, + this.reference, + this.startDate, + this.supportedTypes); + } + + /** Required. Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, + * the {@code amount} param refers to the exact amount to be charged in future payments. + * If {@code maximum}, the amount charged can be up to the value passed for the {@code + * amount} param. + */ + public Builder setAmountType( + PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * End date of the mandate or subscription. If not provided, the mandate will be active + * until canceled. If provided, end date should be after start date. + */ + public Builder setEndDate(Long endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Specifies payment frequency. One of {@code day}, {@code + * week}, {@code month}, {@code year}, or {@code sporadic}. + */ + public Builder setInterval( + PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals between payments. For example, {@code interval=month} and + * {@code interval_count=3} indicates one payment every three months. Maximum of one year + * interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when + * {@code interval=sporadic}. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Required. Unique identifier for the mandate or subscription. */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. + */ + public Builder setStartDate(Long startDate) { + this.startDate = startDate; + return this; + } + + /** + * Add an element to `supportedTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for + * the field documentation. + */ + public Builder addSupportedType( + PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType + element) { + if (this.supportedTypes == null) { + this.supportedTypes = new ArrayList<>(); + } + this.supportedTypes.add(element); + return this; + } + + /** + * Add all elements to `supportedTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for + * the field documentation. + */ + public Builder addAllSupportedType( + List + elements) { + if (this.supportedTypes == null) { + this.supportedTypes = new ArrayList<>(); + } + this.supportedTypes.addAll(elements); + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("sporadic") + SPORADIC("sporadic"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + + public enum SupportedType implements ApiRequestParams.EnumParam { + @SerializedName("india") + INDIA("india"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SupportedType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StatementDetails { + /** Please pass in an address that is within your Stripe user account country. */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Phone number (e.g., a toll-free number that customers can call). */ + @SerializedName("phone") + String phone; + + private StatementDetails(Address address, Map extraParams, String phone) { + this.address = address; + this.extraParams = extraParams; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails( + this.address, this.extraParams, this.phone); + } + + /** Please pass in an address that is within your Stripe user account country. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.Address + address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Phone number (e.g., a toll-free number that customers can call). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the 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 PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails + .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 + * PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the 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 + @EqualsAndHashCode(callSuper = false) + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + @SerializedName("cryptogram") + String cryptogram; + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the + * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + @SerializedName("requestor_challenge_indicator") + String requestorChallengeIndicator; + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + String transactionId; + + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; + + private ThreeDSecure( + AresTransStatus aresTransStatus, + String cryptogram, + ElectronicCommerceIndicator electronicCommerceIndicator, + ExemptionIndicator exemptionIndicator, + Map extraParams, + NetworkOptions networkOptions, + String requestorChallengeIndicator, + String transactionId, + Version version) { + this.aresTransStatus = aresTransStatus; + this.cryptogram = cryptogram; + this.electronicCommerceIndicator = electronicCommerceIndicator; + this.exemptionIndicator = exemptionIndicator; + this.extraParams = extraParams; + this.networkOptions = networkOptions; + this.requestorChallengeIndicator = requestorChallengeIndicator; + this.transactionId = transactionId; + this.version = version; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AresTransStatus aresTransStatus; + + private String cryptogram; + + private ElectronicCommerceIndicator electronicCommerceIndicator; + + private ExemptionIndicator exemptionIndicator; + + private Map extraParams; + + private NetworkOptions networkOptions; + + private String requestorChallengeIndicator; + + private String transactionId; + + private Version version; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure( + this.aresTransStatus, + this.cryptogram, + this.electronicCommerceIndicator, + this.exemptionIndicator, + this.extraParams, + this.networkOptions, + this.requestorChallengeIndicator, + this.transactionId, + this.version); + } + + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + public Builder setAresTransStatus( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus + aresTransStatus) { + this.aresTransStatus = aresTransStatus; + return this; + } + + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + public Builder setCryptogram(String cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } + + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + public Builder setExemptionIndicator( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.ExemptionIndicator + exemptionIndicator) { + this.exemptionIndicator = exemptionIndicator; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + public Builder setNetworkOptions( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + networkOptions) { + this.networkOptions = networkOptions; + return this; + } + + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } + + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + public Builder setTransactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** Required. The version of 3D Secure that was performed. */ + public Builder setVersion( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CartesBancaires cartesBancaires; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } + + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + String cbExemption; + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + @SerializedName("cb_score") + Long cbScore; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CartesBancaires( + CbAvalgo cbAvalgo, + String cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CbAvalgo cbAvalgo; + + private String cbExemption; + + private Long cbScore; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions.CartesBancaires( + this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + } + + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + public Builder setCbAvalgo( + PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires.CbAvalgo + cbAvalgo) { + this.cbAvalgo = cbAvalgo; + return this; + } + + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(String cbExemption) { + this.cbExemption = cbExemption; + return this; + } + + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), + + @SerializedName("1") + N1("1"), + + @SerializedName("2") + N2("2"), + + @SerializedName("3") + N3("3"), + + @SerializedName("4") + N4("4"), + + @SerializedName("A") + A("A"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CbAvalgo(String value) { + this.value = value; + } + } + } + } + + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), + + @SerializedName("C") + C("C"), + + @SerializedName("I") + I("I"), + + @SerializedName("N") + N("N"), + + @SerializedName("R") + R("R"), + + @SerializedName("U") + U("U"), + + @SerializedName("Y") + Y("Y"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AresTransStatus(String value) { + this.value = value; + } + } + + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), + + @SerializedName("02") + N02("02"), + + @SerializedName("05") + N05("05"), + + @SerializedName("06") + N06("06"), + + @SerializedName("07") + N07("07"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } + + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExemptionIndicator(String value) { + this.value = value; + } + } + + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), + + @SerializedName("2.1.0") + N2__1__0("2.1.0"), + + @SerializedName("2.2.0") + N2__2__0("2.2.0"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Version(String value) { + this.value = value; + } + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum Network implements ApiRequestParams.EnumParam { + @SerializedName("amex") + AMEX("amex"), + + @SerializedName("cartes_bancaires") + CARTES_BANCAIRES("cartes_bancaires"), + + @SerializedName("diners") + DINERS("diners"), + + @SerializedName("discover") + DISCOVER("discover"), + + @SerializedName("eftpos_au") + EFTPOS_AU("eftpos_au"), + + @SerializedName("girocard") + GIROCARD("girocard"), + + @SerializedName("interac") + INTERAC("interac"), + + @SerializedName("jcb") + JCB("jcb"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mastercard") + MASTERCARD("mastercard"), + + @SerializedName("unionpay") + UNIONPAY("unionpay"), + + @SerializedName("unknown") + UNKNOWN("unknown"), + + @SerializedName("visa") + VISA("visa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Network(String value) { + this.value = value; + } + } + + public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestDecrementalAuthorization(String value) { + this.value = value; + } + } + + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestExtendedAuthorization(String value) { + this.value = value; + } + } + + public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestIncrementalAuthorization(String value) { + this.value = value; + } + } + + public enum RequestMulticapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestMulticapture(String value) { + this.value = value; + } + } + + public enum RequestOvercapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestOvercapture(String value) { + this.value = value; + } + } + + public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestPartialAuthorization(String value) { + this.value = value; + } + } + + public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { + @SerializedName("any") + ANY("any"), + + @SerializedName("automatic") + AUTOMATIC("automatic"), + + @SerializedName("challenge") + CHALLENGE("challenge"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestThreeDSecure(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Request ability to capture this payment beyond the standard authorization + * validity window. + */ + @SerializedName("request_extended_authorization") + Boolean requestExtendedAuthorization; + + /** + * Request ability to increment + * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported + * in the Confirm response + * to verify support. + */ + @SerializedName("request_incremental_authorization_support") + Boolean requestIncrementalAuthorizationSupport; + + /** + * Network routing priority on co-branded EMV cards supporting domestic debit and + * international card schemes. + */ + @SerializedName("routing") + Routing routing; + + private CardPresent( + CaptureMethod captureMethod, + Map extraParams, + Boolean requestExtendedAuthorization, + Boolean requestIncrementalAuthorizationSupport, + Routing routing) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.requestExtendedAuthorization = requestExtendedAuthorization; + this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; + this.routing = routing; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + private Boolean requestExtendedAuthorization; + + private Boolean requestIncrementalAuthorizationSupport; + + private Routing routing; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent( + this.captureMethod, + this.extraParams, + this.requestExtendedAuthorization, + this.requestIncrementalAuthorizationSupport, + this.routing); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Request ability to capture this payment beyond the standard authorization + * validity window. + */ + public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { + this.requestExtendedAuthorization = requestExtendedAuthorization; + return this; + } + + /** + * Request ability to increment + * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported + * in the Confirm response + * to verify support. + */ + public Builder setRequestIncrementalAuthorizationSupport( + Boolean requestIncrementalAuthorizationSupport) { + this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; + return this; + } + + /** + * Network routing priority on co-branded EMV cards supporting domestic debit and + * international card schemes. + */ + public Builder setRouting( + PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing routing) { + this.routing = routing; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Routing { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Routing requested priority. */ + @SerializedName("requested_priority") + RequestedPriority requestedPriority; + + private Routing(Map extraParams, RequestedPriority requestedPriority) { + this.extraParams = extraParams; + this.requestedPriority = requestedPriority; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private RequestedPriority requestedPriority; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing( + this.extraParams, this.requestedPriority); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Routing requested priority. */ + public Builder setRequestedPriority( + PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority + requestedPriority) { + this.requestedPriority = requestedPriority; + return this; + } + } + + public enum RequestedPriority implements ApiRequestParams.EnumParam { + @SerializedName("domestic") + DOMESTIC("domestic"), + + @SerializedName("international") + INTERNATIONAL("international"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestedPriority(String value) { + this.value = value; + } + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Cashapp( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Cashapp build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Cashapp( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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 PaymentIntentCreateParams.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Cashapp.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Crypto build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Crypto( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Crypto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Crypto#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Crypto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerBalance { + /** + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. + */ + @SerializedName("bank_transfer") + BankTransfer bankTransfer; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 funding method type to be used when there are not enough funds in the customer balance. + * Permitted values include: {@code bank_transfer}. + */ + @SerializedName("funding_type") + FundingType fundingType; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private CustomerBalance( + BankTransfer bankTransfer, + Map extraParams, + FundingType fundingType, + SetupFutureUsage setupFutureUsage) { + this.bankTransfer = bankTransfer; + this.extraParams = extraParams; + this.fundingType = fundingType; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankTransfer bankTransfer; + + private Map extraParams; + + private FundingType fundingType; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance( + this.bankTransfer, this.extraParams, this.fundingType, this.setupFutureUsage); + } + + /** + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. + */ + public Builder setBankTransfer( + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + bankTransfer) { + this.bankTransfer = bankTransfer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.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 + * PaymentIntentCreateParams.PaymentMethodOptions.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; + } + + /** + * The funding method type to be used when there are not enough funds in the customer + * balance. Permitted values include: {@code bank_transfer}. + */ + public Builder setFundingType( + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.FundingType + fundingType) { + this.fundingType = fundingType; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankTransfer { + /** Configuration for the eu_bank_transfer funding type. */ + @SerializedName("eu_bank_transfer") + EuBankTransfer euBankTransfer; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * List of address types that should be returned in the financial_addresses response. If not + * specified, all valid types will be returned. + * + *

Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code + * spei}. + */ + @SerializedName("requested_address_types") + List< + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes; + + /** + * Required. The list of bank transfer types that this PaymentIntent is + * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code + * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code + * us_bank_transfer}. + */ + @SerializedName("type") + Type type; + + private BankTransfer( + EuBankTransfer euBankTransfer, + Map extraParams, + List< + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes, + Type type) { + this.euBankTransfer = euBankTransfer; + this.extraParams = extraParams; + this.requestedAddressTypes = requestedAddressTypes; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private EuBankTransfer euBankTransfer; + + private Map extraParams; + + private List< + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer( + this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); + } + + /** Configuration for the eu_bank_transfer funding type. */ + public Builder setEuBankTransfer( + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer + euBankTransfer) { + this.euBankTransfer = euBankTransfer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `requestedAddressTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} + * for the field documentation. + */ + public Builder addRequestedAddressType( + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType + element) { + if (this.requestedAddressTypes == null) { + this.requestedAddressTypes = new ArrayList<>(); + } + this.requestedAddressTypes.add(element); + return this; + } + + /** + * Add all elements to `requestedAddressTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} + * for the field documentation. + */ + public Builder addAllRequestedAddressType( + List< + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + elements) { + if (this.requestedAddressTypes == null) { + this.requestedAddressTypes = new ArrayList<>(); + } + this.requestedAddressTypes.addAll(elements); + return this; + } + + /** + * Required. The list of bank transfer types that this PaymentIntent is + * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code + * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code + * us_bank_transfer}. + */ + public Builder setType( + PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EuBankTransfer { + /** + * Required. The desired country code of the bank account information. + * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, + * or {@code NL}. + */ + @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; + + private EuBankTransfer(String country, Map extraParams) { + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer(this.country, this.extraParams); + } + + /** + * Required. The desired country code of the bank account information. + * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, + * or {@code NL}. + */ + 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 + * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#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 RequestedAddressType implements ApiRequestParams.EnumParam { + @SerializedName("aba") + ABA("aba"), + + @SerializedName("iban") + IBAN("iban"), + + @SerializedName("sepa") + SEPA("sepa"), + + @SerializedName("sort_code") + SORT_CODE("sort_code"), + + @SerializedName("spei") + SPEI("spei"), + + @SerializedName("swift") + SWIFT("swift"), + + @SerializedName("zengin") + ZENGIN("zengin"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestedAddressType(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("eu_bank_transfer") + EU_BANK_TRANSFER("eu_bank_transfer"), + + @SerializedName("gb_bank_transfer") + GB_BANK_TRANSFER("gb_bank_transfer"), + + @SerializedName("jp_bank_transfer") + JP_BANK_TRANSFER("jp_bank_transfer"), + + @SerializedName("mx_bank_transfer") + MX_BANK_TRANSFER("mx_bank_transfer"), + + @SerializedName("us_bank_transfer") + US_BANK_TRANSFER("us_bank_transfer"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + public enum FundingType implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FundingType(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class 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; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Eps build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Eps( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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 PaymentIntentCreateParams.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Eps.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Fpx { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Fpx build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Fpx( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Fpx#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Fpx#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Fpx.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Giropay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Giropay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Giropay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Giropay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Giropay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Giropay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Gopay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Gopay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Gopay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Gopay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Gopay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Gopay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Grabpay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Grabpay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Grabpay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Grabpay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Grabpay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer { + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 + * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + @SerializedName("expires_after") + Long expiresAfter; + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private IdBankTransfer( + Long expiresAfter, + Long expiresAt, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.expiresAfter = expiresAfter; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfter; + + private Long expiresAt; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer( + this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + public Builder setExpiresAfter(Long expiresAfter) { + this.expiresAfter = expiresAfter; + return this; + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ideal { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Ideal(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Ideal build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Ideal( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Ideal#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Ideal#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Ideal.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InteracPresent { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private InteracPresent(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private KakaoPay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Klarna { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** On-demand details if setting up or charging an on-demand payment. */ + @SerializedName("on_demand") + OnDemand onDemand; + + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + @SerializedName("supplementary_purchase_data") + Object supplementaryPurchaseData; + + private Klarna( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + OnDemand onDemand, + PreferredLocale preferredLocale, + SetupFutureUsage setupFutureUsage, + Object subscriptions, + Object supplementaryPurchaseData) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.onDemand = onDemand; + this.preferredLocale = preferredLocale; + this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; + this.supplementaryPurchaseData = supplementaryPurchaseData; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private OnDemand onDemand; + + private PreferredLocale preferredLocale; + + private SetupFutureUsage setupFutureUsage; + + private Object subscriptions; + + private Object supplementaryPurchaseData; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna( + this.captureMethod, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.setupFutureUsage, + this.subscriptions, + this.supplementaryPurchaseData); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Klarna#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Klarna#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** On-demand details if setting up or charging an on-demand payment. */ + public Builder setOnDemand( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.PreferredLocale preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link PaymentIntentCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List + subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData(EmptyParam supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval 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; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + String name; + + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + String reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + String name, + NextBilling nextBilling, + String reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String name; + + private NextBilling nextBilling; + + private String reference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.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. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. - */ - public Builder setStatementDetails(EmptyParam statementDetails) { - this.statementDetails = statementDetails; - return this; - } + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - /** - * If 3D Secure authentication was performed with a third-party provider, the authentication - * details to use for this payment. - */ - public Builder setThreeDSecure( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { - this.threeDSecure = threeDSecure; - return this; + @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 @EqualsAndHashCode(callSuper = false) - public static class Installments { - /** - * Setting to true enables installments for this PaymentIntent. This will cause the response - * to contain a list of available installment plans. Setting to false will prevent any - * selected plan from applying to a charge. - */ - @SerializedName("enabled") - Boolean enabled; + public static class SupplementaryPurchaseData { + /** Supplementary bus reservation details. */ + @SerializedName("bus_reservation_details") + Object busReservationDetails; + + /** Supplementary event reservation details. */ + @SerializedName("event_reservation_details") + Object eventReservationDetails; /** * Map of extra parameters for custom features not available in this client library. The @@ -19086,17 +29963,49 @@ public static class Installments { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * The selected installment plan to use for this payment attempt. This parameter can only be - * provided during confirmation. - */ - @SerializedName("plan") - Object plan; + /** Supplementary ferry reservation details. */ + @SerializedName("ferry_reservation_details") + Object ferryReservationDetails; - private Installments(Boolean enabled, Map extraParams, Object plan) { - this.enabled = enabled; + /** Supplementary insurance details. */ + @SerializedName("insurances") + Object insurances; + + /** Supplementary marketplace seller details. */ + @SerializedName("marketplace_sellers") + Object marketplaceSellers; + + /** Supplementary round trip reservation details. */ + @SerializedName("round_trip_reservation_details") + Object roundTripReservationDetails; + + /** Supplementary train reservation details. */ + @SerializedName("train_reservation_details") + Object trainReservationDetails; + + /** Voucher details, such as a gift card or discount code. */ + @SerializedName("vouchers") + Object vouchers; + + private SupplementaryPurchaseData( + Object busReservationDetails, + Object eventReservationDetails, + Map extraParams, + Object ferryReservationDetails, + Object insurances, + Object marketplaceSellers, + Object roundTripReservationDetails, + Object trainReservationDetails, + Object vouchers) { + this.busReservationDetails = busReservationDetails; + this.eventReservationDetails = eventReservationDetails; this.extraParams = extraParams; - this.plan = plan; + this.ferryReservationDetails = ferryReservationDetails; + this.insurances = insurances; + this.marketplaceSellers = marketplaceSellers; + this.roundTripReservationDetails = roundTripReservationDetails; + this.trainReservationDetails = trainReservationDetails; + this.vouchers = vouchers; } public static Builder builder() { @@ -19104,87 +30013,651 @@ public static Builder builder() { } public static class Builder { - private Boolean enabled; + private Object busReservationDetails; + + private Object eventReservationDetails; private Map extraParams; - private Object plan; + private Object ferryReservationDetails; + + private Object insurances; + + private Object marketplaceSellers; + + private Object roundTripReservationDetails; + + private Object trainReservationDetails; + + private Object vouchers; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData( + this.busReservationDetails, + this.eventReservationDetails, + this.extraParams, + this.ferryReservationDetails, + this.insurances, + this.marketplaceSellers, + this.roundTripReservationDetails, + this.trainReservationDetails, + this.vouchers); + } + + /** + * Add an element to `busReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addBusReservationDetail( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail + element) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `busReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllBusReservationDetail( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + elements) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails(EmptyParam busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** + * Add an element to `eventReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addEventReservationDetail( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail + element) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `eventReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllEventReservationDetail( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + elements) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails(EmptyParam eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `ferryReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFerryReservationDetail( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail + element) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `ferryReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFerryReservationDetail( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + elements) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails(EmptyParam ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } + + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addInsurance( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance + element) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllInsurance( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + elements) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .addAll(elements); + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances(EmptyParam insurances) { + this.insurances = insurances; + return this; + } + + /** Supplementary insurance details. */ + public Builder setInsurances( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + insurances) { + this.insurances = insurances; + return this; + } + + /** + * Add an element to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addMarketplaceSeller( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller + element) { + if (this.marketplaceSellers == null || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .add(element); + return this; + } + + /** + * Add all elements to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllMarketplaceSeller( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + elements) { + if (this.marketplaceSellers == null || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .addAll(elements); + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers(EmptyParam marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** + * Add an element to `roundTripReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addRoundTripReservationDetail( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail + element) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `roundTripReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllRoundTripReservationDetail( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + elements) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails(EmptyParam roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments( - this.enabled, this.extraParams, this.plan); + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; } /** - * Setting to true enables installments for this PaymentIntent. This will cause the - * response to contain a list of available installment plans. Setting to false will - * prevent any selected plan from applying to a charge. + * Add an element to `trainReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. */ - public Builder setEnabled(Boolean enabled) { - this.enabled = enabled; + @SuppressWarnings("unchecked") + public Builder addTrainReservationDetail( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail + element) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .add(element); return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments#extraParams} for the - * field documentation. + * Add all elements to `trainReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @SuppressWarnings("unchecked") + public Builder addAllTrainReservationDetail( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + elements) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); } - this.extraParams.put(key, value); + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails(EmptyParam trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } + + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments#extraParams} for the - * field documentation. + * Add an element to `vouchers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @SuppressWarnings("unchecked") + public Builder addVoucher( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher + element) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); } - this.extraParams.putAll(map); + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .add(element); return this; } /** - * The selected installment plan to use for this payment attempt. This parameter can only - * be provided during confirmation. + * Add all elements to `vouchers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. */ - public Builder setPlan( - PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan plan) { - this.plan = plan; + @SuppressWarnings("unchecked") + public Builder addAllVoucher( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + elements) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); + } + ((List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .addAll(elements); return this; } - /** - * The selected installment plan to use for this payment attempt. This parameter can only - * be provided during confirmation. - */ - public Builder setPlan(EmptyParam plan) { - this.plan = plan; + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers(EmptyParam vouchers) { + this.vouchers = vouchers; + return this; + } + + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + vouchers) { + this.vouchers = vouchers; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Plan { - /** - * For {@code fixed_count} installment plans, this is required. It represents the number - * of installment payments your customer will make to their credit card. - */ - @SerializedName("count") - Long count; + public static class BusReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; /** * Map of extra parameters for custom features not available in this client library. The @@ -19196,26 +30669,55 @@ public static class Plan { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * For {@code fixed_count} installment plans, this is required. It represents the interval - * between installment payments your customer will make to their credit card. One of - * {@code month}. - */ - @SerializedName("interval") - Interval interval; - - /** - * Required. Type of installment plan, one of {@code fixed_count}, {@code - * bonus}, or {@code revolving}. - */ - @SerializedName("type") - Type type; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; - private Plan(Long count, Map extraParams, Interval interval, Type type) { - this.count = count; + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private BusReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances, + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; this.extraParams = extraParams; - this.interval = interval; - this.type = type; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } public static Builder builder() { @@ -19223,26 +30725,83 @@ public static Builder builder() { } public static class Builder { - private Long count; + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; private Map extraParams; - private Interval interval; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; - private Type type; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan( - this.count, this.extraParams, this.interval, this.type); + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); } - /** - * For {@code fixed_count} installment plans, this is required. It represents the number - * of installment payments your customer will make to their credit card. - */ - public Builder setCount(Long count) { - this.count = count; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure + departure) { + this.departure = departure; return this; } @@ -19250,7 +30809,7 @@ public Builder setCount(Long count) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19265,503 +30824,920 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } - this.extraParams.putAll(map); - return this; + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } - /** - * For {@code fixed_count} installment plans, this is required. It represents the - * interval between installment payments your customer will make to their credit card. - * One of {@code month}. - */ - public Builder setInterval( - PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan.Interval - interval) { - this.interval = interval; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** - * Required. Type of installment plan, one of {@code fixed_count}, - * {@code bonus}, or {@code revolving}. - */ - public Builder setType( - PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { - this.type = type; - return this; - } - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("month") - MONTH("month"); + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static Builder builder() { + return new Builder(); + } - Interval(String value) { - this.value = value; + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } } } - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("bonus") - BONUS("bonus"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"), + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - @SerializedName("revolving") - REVOLVING("revolving"); + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - Type(String value) { - this.value = value; + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; } - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { - /** Required. Amount to be charged for future payments. */ - @SerializedName("amount") - Long amount; + public static Builder builder() { + return new Builder(); + } - /** - * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, the - * {@code amount} param refers to the exact amount to be charged in future payments. If - * {@code maximum}, the amount charged can be up to the value passed for the {@code amount} - * param. - */ - @SerializedName("amount_type") - AmountType amountType; + public static class Builder { + private Address address; - /** - * A description of the mandate or subscription that is meant to be displayed to the - * customer. - */ - @SerializedName("description") - String description; + private Long departsAt; - /** - * End date of the mandate or subscription. If not provided, the mandate will be active - * until canceled. If provided, end date should be after start date. - */ - @SerializedName("end_date") - Long endDate; + private String departureLocation; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Map extraParams; - /** - * Required. Specifies payment frequency. One of {@code day}, {@code week}, - * {@code month}, {@code year}, or {@code sporadic}. - */ - @SerializedName("interval") - Interval interval; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - /** - * The number of intervals between payments. For example, {@code interval=month} and {@code - * interval_count=3} indicates one payment every three months. Maximum of one year interval - * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code - * interval=sporadic}. - */ - @SerializedName("interval_count") - Long intervalCount; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - /** Required. Unique identifier for the mandate or subscription. */ - @SerializedName("reference") - String reference; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - /** - * Required. Start date of the mandate or subscription. Start date should - * not be lesser than yesterday. - */ - @SerializedName("start_date") - Long startDate; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - /** Specifies the type of mandates supported. Possible values are {@code india}. */ - @SerializedName("supported_types") - List - supportedTypes; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private MandateOptions( - Long amount, - AmountType amountType, - String description, - Long endDate, - Map extraParams, - Interval interval, - Long intervalCount, - String reference, - Long startDate, - List - supportedTypes) { - this.amount = amount; - this.amountType = amountType; - this.description = description; - this.endDate = endDate; - this.extraParams = extraParams; - this.interval = interval; - this.intervalCount = intervalCount; - this.reference = reference; - this.startDate = startDate; - this.supportedTypes = supportedTypes; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - public static class Builder { - private Long amount; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - private AmountType amountType; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - private String description; + public static Builder builder() { + return new Builder(); + } - private Long endDate; + public static class Builder { + private String city; - private Map extraParams; + private String country; - private Interval interval; + private Map extraParams; - private Long intervalCount; + private String postalCode; - private String reference; + private String region; - private Long startDate; + private String streetAddress; - private List< - PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> - supportedTypes; + private String streetAddress2; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions( - this.amount, - this.amountType, - this.description, - this.endDate, - this.extraParams, - this.interval, - this.intervalCount, - this.reference, - this.startDate, - this.supportedTypes); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - /** Required. Amount to be charged for future payments. */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** - * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, - * the {@code amount} param refers to the exact amount to be charged in future payments. - * If {@code maximum}, the amount charged can be up to the value passed for the {@code - * amount} param. - */ - public Builder setAmountType( - PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.AmountType - amountType) { - this.amountType = amountType; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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; + } - /** - * A description of the mandate or subscription that is meant to be displayed to the - * customer. - */ - public Builder setDescription(String description) { - this.description = description; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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; + } - /** - * End date of the mandate or subscription. If not provided, the mandate will be active - * until canceled. If provided, end date should be after start date. - */ - public Builder setEndDate(Long endDate) { - this.endDate = endDate; - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; } - this.extraParams.putAll(map); - return this; - } - /** - * Required. Specifies payment frequency. One of {@code day}, {@code - * week}, {@code month}, {@code year}, or {@code sporadic}. - */ - public Builder setInterval( - PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.Interval - interval) { - this.interval = interval; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * The number of intervals between payments. For example, {@code interval=month} and - * {@code interval_count=3} indicates one payment every three months. Maximum of one year - * interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when - * {@code interval=sporadic}. - */ - public Builder setIntervalCount(Long intervalCount) { - this.intervalCount = intervalCount; - return this; - } + public static class Builder { + private String currency; - /** Required. Unique identifier for the mandate or subscription. */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } + private Map extraParams; - /** - * Required. Start date of the mandate or subscription. Start date should - * not be lesser than yesterday. - */ - public Builder setStartDate(Long startDate) { - this.startDate = startDate; - return this; - } + private String insuranceCompanyName; - /** - * Add an element to `supportedTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for - * the field documentation. - */ - public Builder addSupportedType( - PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType - element) { - if (this.supportedTypes == null) { - this.supportedTypes = new ArrayList<>(); - } - this.supportedTypes.add(element); - return this; - } + private InsuranceType insuranceType; - /** - * Add all elements to `supportedTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for - * the field documentation. - */ - public Builder addAllSupportedType( - List - elements) { - if (this.supportedTypes == null) { - this.supportedTypes = new ArrayList<>(); - } - this.supportedTypes.addAll(elements); - return this; - } - } + private Long price; - public enum AmountType implements ApiRequestParams.EnumParam { - @SerializedName("fixed") - FIXED("fixed"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - @SerializedName("maximum") - MAXIMUM("maximum"); + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - AmountType(String value) { - this.value = value; - } - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#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 Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - @SerializedName("month") - MONTH("month"), + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - @SerializedName("sporadic") - SPORADIC("sporadic"), + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - @SerializedName("week") - WEEK("week"), + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - @SerializedName("year") - YEAR("year"); + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("cancelation") + CANCELATION("cancelation"), - Interval(String value) { - this.value = value; - } - } + @SerializedName("emergency") + EMERGENCY("emergency"), - public enum SupportedType implements ApiRequestParams.EnumParam { - @SerializedName("india") - INDIA("india"); + @SerializedName("medical") + MEDICAL("medical"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - SupportedType(String value) { - this.value = value; + InsuranceType(String value) { + this.value = value; + } + } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class StatementDetails { - /** Please pass in an address that is within your Stripe user account country. */ - @SerializedName("address") - Address address; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 family name of the person. */ + @SerializedName("family_name") + String familyName; + + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; + + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - /** Phone number (e.g., a toll-free number that customers can call). */ - @SerializedName("phone") - String phone; + public static Builder builder() { + return new Builder(); + } - private StatementDetails(Address address, Map extraParams, String phone) { - this.address = address; - this.extraParams = extraParams; - this.phone = phone; - } + public static class Builder { + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private String familyName; - public static class Builder { - private Address address; + private String givenName; - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - private String phone; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails( - this.address, this.extraParams, this.phone); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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; + } - /** Please pass in an address that is within your Stripe user account country. */ - public Builder setAddress( - PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.Address - address) { - this.address = address; - return this; - } + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails#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 TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** Phone number (e.g., a toll-free number that customers can call). */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - String city; + public static class EventReservationDetail { + /** Indicates if the tickets are digitally checked when entering the venue. */ + @SerializedName("access_controlled_venue") + Boolean accessControlledVenue; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - String country; + /** Address of the event. */ + @SerializedName("address") + Address address; + + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** End timestamp of the event. */ + @SerializedName("ends_at") + Long endsAt; + + /** Company selling the ticket. */ + @SerializedName("event_company_name") + String eventCompanyName; + + /** Name of the event. */ + @SerializedName("event_name") + String eventName; + + /** Type of the event. */ + @SerializedName("event_type") + EventType eventType; /** * Map of extra parameters for custom features not available in this client library. The @@ -19773,37 +31749,47 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - String line1; - - /** Address line 2, such as the 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, + /** List of insurances for this event. */ + @SerializedName("insurances") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance> + insurances; + + /** Start timestamp of the event. */ + @SerializedName("starts_at") + Long startsAt; + + /** Name of the venue where the event takes place. */ + @SerializedName("venue_name") + String venueName; + + private EventReservationDetail( + Boolean accessControlledVenue, + Address address, + String affiliateName, + Long endsAt, + String eventCompanyName, + String eventName, + EventType eventType, Map extraParams, - String line1, - String line2, - String postalCode, - String state) { - this.city = city; - this.country = country; + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances, + Long startsAt, + String venueName) { + this.accessControlledVenue = accessControlledVenue; + this.address = address; + this.affiliateName = affiliateName; + this.endsAt = endsAt; + this.eventCompanyName = eventCompanyName; + this.eventName = eventName; + this.eventType = eventType; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.insurances = insurances; + this.startsAt = startsAt; + this.venueName = venueName; } public static Builder builder() { @@ -19811,46 +31797,95 @@ public static Builder builder() { } public static class Builder { - private String city; + private Boolean accessControlledVenue; - private String country; + private Address address; - private Map extraParams; + private String affiliateName; - private String line1; + private Long endsAt; - private String line2; + private String eventCompanyName; - private String postalCode; + private String eventName; - private String state; + private EventType eventType; + + private Map extraParams; + + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance> + insurances; + + private Long startsAt; + + private String venueName; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.Address + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails - .Address( - this.city, - this.country, + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail( + this.accessControlledVenue, + this.address, + this.affiliateName, + this.endsAt, + this.eventCompanyName, + this.eventName, + this.eventType, this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); + this.insurances, + this.startsAt, + this.venueName); } - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; return this; } - /** - * Two-letter country code (ISO 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Address of the event. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Address + address) { + this.address = address; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** End timestamp of the event. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } + + /** Company selling the ticket. */ + public Builder setEventCompanyName(String eventCompanyName) { + this.eventCompanyName = eventCompanyName; + return this; + } + + /** Name of the event. */ + public Builder setEventName(String eventName) { + this.eventName = eventName; + return this; + } + + /** Type of the event. */ + public Builder setEventType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.EventType + eventType) { + this.eventType = eventType; return this; } @@ -19858,7 +31893,7 @@ public Builder setCountry(String country) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.Address#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19873,7 +31908,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.StatementDetails.Address#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -19884,267 +31919,417 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); return this; } - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; + /** Start timestamp of the event. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + + /** Name of the venue where the event takes place. */ + public Builder setVenueName(String venueName) { + this.venueName = venueName; return this; } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; - } - } - } - } + private String streetAddress; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class ThreeDSecure { - /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ - @SerializedName("ares_trans_status") - AresTransStatus aresTransStatus; + private String streetAddress2; - /** - * Required. The cryptogram, also known as the "authentication - * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a - * 28-character string. (Most 3D Secure providers will return the base64-encoded version, - * which is what you should specify here.) - */ - @SerializedName("cryptogram") - String cryptogram; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - /** - * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and - * indicates what degree of authentication was performed. - */ - @SerializedName("electronic_commerce_indicator") - ElectronicCommerceIndicator electronicCommerceIndicator; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ - @SerializedName("exemption_indicator") - ExemptionIndicator exemptionIndicator; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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; + } - /** - * Network specific 3DS fields. Network specific arguments require an explicit card brand - * choice. The parameter `payment_method_options.card.network`` must be populated - * accordingly - */ - @SerializedName("network_options") - NetworkOptions networkOptions; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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; + } - /** - * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the - * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - */ - @SerializedName("requestor_challenge_indicator") - String requestorChallengeIndicator; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - @SerializedName("transaction_id") - String transactionId; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - /** Required. The version of 3D Secure that was performed. */ - @SerializedName("version") - Version version; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - private ThreeDSecure( - AresTransStatus aresTransStatus, - String cryptogram, - ElectronicCommerceIndicator electronicCommerceIndicator, - ExemptionIndicator exemptionIndicator, - Map extraParams, - NetworkOptions networkOptions, - String requestorChallengeIndicator, - String transactionId, - Version version) { - this.aresTransStatus = aresTransStatus; - this.cryptogram = cryptogram; - this.electronicCommerceIndicator = electronicCommerceIndicator; - this.exemptionIndicator = exemptionIndicator; - this.extraParams = extraParams; - this.networkOptions = networkOptions; - this.requestorChallengeIndicator = requestorChallengeIndicator; - this.transactionId = transactionId; - this.version = version; - } + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } - public static Builder builder() { - return new Builder(); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - public static class Builder { - private AresTransStatus aresTransStatus; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 String cryptogram; + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - private ElectronicCommerceIndicator electronicCommerceIndicator; + public static Builder builder() { + return new Builder(); + } - private ExemptionIndicator exemptionIndicator; + public static class Builder { + private String currency; - private Map extraParams; + private Map extraParams; - private NetworkOptions networkOptions; + private String insuranceCompanyName; - private String requestorChallengeIndicator; + private InsuranceType insuranceType; - private String transactionId; + private Long price; - private Version version; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure( - this.aresTransStatus, - this.cryptogram, - this.electronicCommerceIndicator, - this.exemptionIndicator, - this.extraParams, - this.networkOptions, - this.requestorChallengeIndicator, - this.transactionId, - this.version); - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ - public Builder setAresTransStatus( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus - aresTransStatus) { - this.aresTransStatus = aresTransStatus; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Required. The cryptogram, also known as the "authentication - * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a - * 28-character string. (Most 3D Secure providers will return the base64-encoded version, - * which is what you should specify here.) - */ - public Builder setCryptogram(String cryptogram) { - this.cryptogram = cryptogram; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#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 Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and - * indicates what degree of authentication was performed. - */ - public Builder setElectronicCommerceIndicator( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure - .ElectronicCommerceIndicator - electronicCommerceIndicator) { - this.electronicCommerceIndicator = electronicCommerceIndicator; - return this; - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ - public Builder setExemptionIndicator( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.ExemptionIndicator - exemptionIndicator) { - this.exemptionIndicator = exemptionIndicator; - return this; - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } } - this.extraParams.putAll(map); - return this; } - /** - * Network specific 3DS fields. Network specific arguments require an explicit card brand - * choice. The parameter `payment_method_options.card.network`` must be populated - * accordingly - */ - public Builder setNetworkOptions( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - networkOptions) { - this.networkOptions = networkOptions; - return this; - } + public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("concert") + CONCERT("concert"), - /** - * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in - * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - */ - public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { - this.requestorChallengeIndicator = requestorChallengeIndicator; - return this; - } + @SerializedName("conference") + CONFERENCE("conference"), - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - public Builder setTransactionId(String transactionId) { - this.transactionId = transactionId; - return this; - } + @SerializedName("digital_education") + DIGITAL_EDUCATION("digital_education"), - /** Required. The version of 3D Secure that was performed. */ - public Builder setVersion( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { - this.version = version; - return this; + @SerializedName("expo") + EXPO("expo"), + + @SerializedName("festival") + FESTIVAL("festival"), + + @SerializedName("in_person_education") + IN_PERSON_EDUCATION("in_person_education"), + + @SerializedName("sport") + SPORT("sport"), + + @SerializedName("tour") + TOUR("tour"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EventType(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class NetworkOptions { - /** Cartes Bancaires-specific 3DS fields. */ - @SerializedName("cartes_bancaires") - CartesBancaires cartesBancaires; + public static class FerryReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; /** * Map of extra parameters for custom features not available in this client library. The @@ -20156,9 +32341,55 @@ public static class NetworkOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { - this.cartesBancaires = cartesBancaires; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private FerryReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances, + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } public static Builder builder() { @@ -20166,23 +32397,83 @@ public static Builder builder() { } public static class Builder { - private CartesBancaires cartesBancaires; + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; private Map extraParams; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; + + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure - .NetworkOptions(this.cartesBancaires, this.extraParams); + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); } - /** Cartes Bancaires-specific 3DS fields. */ - public Builder setCartesBancaires( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires - cartesBancaires) { - this.cartesBancaires = cartesBancaires; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure + departure) { + this.departure = departure; return this; } @@ -20190,7 +32481,7 @@ public Builder setCartesBancaires( * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -20201,47 +32492,374 @@ public Builder putExtraParam(String key, Object value) { return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; + + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; + + /** The country in ISO 3166-1 alpha-2 format. */ + @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; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } } - this.extraParams.putAll(map); - return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class CartesBancaires { - /** - * Required. The cryptogram calculation algorithm used by the card - * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code - * cavvAlgorithm}. messageExtension: CB-AVALGO - */ - @SerializedName("cb_avalgo") - CbAvalgo cbAvalgo; + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - /** - * The exemption indicator returned from Cartes Bancaires in the ARes. message - * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low - * significant byte first and most significant bit first) that has been Base64 encoded - */ - @SerializedName("cb_exemption") - String cbExemption; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - /** - * The risk score returned from Cartes Bancaires in the ARes. message extension: - * CB-SCORE; numeric value 0-99 - */ - @SerializedName("cb_score") - Long cbScore; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; /** * Map of extra parameters for custom features not available in this client library. The @@ -20253,14 +32871,14 @@ public static class CartesBancaires { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CartesBancaires( - CbAvalgo cbAvalgo, - String cbExemption, - Long cbScore, + private Departure( + Address address, + Long departsAt, + String departureLocation, Map extraParams) { - this.cbAvalgo = cbAvalgo; - this.cbExemption = cbExemption; - this.cbScore = cbScore; + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; this.extraParams = extraParams; } @@ -20269,52 +32887,41 @@ public static Builder builder() { } public static class Builder { - private CbAvalgo cbAvalgo; + private Address address; - private String cbExemption; + private Long departsAt; - private Long cbScore; + private String departureLocation; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure - .NetworkOptions.CartesBancaires( - this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); } - /** - * Required. The cryptogram calculation algorithm used by the card - * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code - * cavvAlgorithm}. messageExtension: CB-AVALGO - */ - public Builder setCbAvalgo( - PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires.CbAvalgo - cbAvalgo) { - this.cbAvalgo = cbAvalgo; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure.Address + address) { + this.address = address; return this; } - /** - * The exemption indicator returned from Cartes Bancaires in the ARes. message - * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low - * significant byte first and most significant bit first) that has been Base64 encoded - */ - public Builder setCbExemption(String cbExemption) { - this.cbExemption = cbExemption; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; return this; } - /** - * The risk score returned from Cartes Bancaires in the ARes. message extension: - * CB-SCORE; numeric value 0-99 - */ - public Builder setCbScore(Long cbScore) { - this.cbScore = cbScore; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; return this; } @@ -20322,7 +32929,7 @@ public Builder setCbScore(Long cbScore) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -20337,7 +32944,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -20349,1288 +32956,1213 @@ public Builder putAllExtraParam(Map map) { } } - public enum CbAvalgo implements ApiRequestParams.EnumParam { - @SerializedName("0") - N0("0"), - - @SerializedName("1") - N1("1"), - - @SerializedName("2") - N2("2"), - - @SerializedName("3") - N3("3"), - - @SerializedName("4") - N4("4"), - - @SerializedName("A") - A("A"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - CbAvalgo(String value) { - this.value = value; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; } - } - } - } - - public enum AresTransStatus implements ApiRequestParams.EnumParam { - @SerializedName("A") - A("A"), - - @SerializedName("C") - C("C"), - - @SerializedName("I") - I("I"), - - @SerializedName("N") - N("N"), - - @SerializedName("R") - R("R"), - @SerializedName("U") - U("U"), - - @SerializedName("Y") - Y("Y"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - AresTransStatus(String value) { - this.value = value; - } - } + public static Builder builder() { + return new Builder(); + } - public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { - @SerializedName("01") - N01("01"), + public static class Builder { + private String city; - @SerializedName("02") - N02("02"), + private String country; - @SerializedName("05") - N05("05"), + private Map extraParams; - @SerializedName("06") - N06("06"), + private String postalCode; - @SerializedName("07") - N07("07"); + private String region; - @Getter(onMethod_ = {@Override}) - private final String value; + private String streetAddress; - ElectronicCommerceIndicator(String value) { - this.value = value; - } - } + private String streetAddress2; - public enum ExemptionIndicator implements ApiRequestParams.EnumParam { - @SerializedName("low_risk") - LOW_RISK("low_risk"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - @SerializedName("none") - NONE("none"); + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - ExemptionIndicator(String value) { - this.value = value; - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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; + } - public enum Version implements ApiRequestParams.EnumParam { - @SerializedName("1.0.2") - N1__0__2("1.0.2"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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; + } - @SerializedName("2.1.0") - N2__1__0("2.1.0"), + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("2.2.0") - N2__2__0("2.2.0"); + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - Version(String value) { - this.value = value; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } } - } - } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } - - public enum Network implements ApiRequestParams.EnumParam { - @SerializedName("amex") - AMEX("amex"), - - @SerializedName("cartes_bancaires") - CARTES_BANCAIRES("cartes_bancaires"), - @SerializedName("diners") - DINERS("diners"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - @SerializedName("discover") - DISCOVER("discover"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("eftpos_au") - EFTPOS_AU("eftpos_au"), + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - @SerializedName("girocard") - GIROCARD("girocard"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("interac") - INTERAC("interac"), + public static class Builder { + private String currency; - @SerializedName("jcb") - JCB("jcb"), + private Map extraParams; - @SerializedName("link") - LINK("link"), + private String insuranceCompanyName; - @SerializedName("mastercard") - MASTERCARD("mastercard"), + private InsuranceType insuranceType; - @SerializedName("unionpay") - UNIONPAY("unionpay"), + private Long price; - @SerializedName("unknown") - UNKNOWN("unknown"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - @SerializedName("visa") - VISA("visa"); + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - Network(String value) { - this.value = value; - } - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#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 RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - @SerializedName("never") - NEVER("never"); + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - RequestDecrementalAuthorization(String value) { - this.value = value; - } - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - @SerializedName("never") - NEVER("never"); + @SerializedName("cancelation") + CANCELATION("cancelation"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("emergency") + EMERGENCY("emergency"), - RequestExtendedAuthorization(String value) { - this.value = value; - } - } + @SerializedName("medical") + MEDICAL("medical"); - public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("never") - NEVER("never"); + InsuranceType(String value) { + this.value = value; + } + } + } - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - RequestIncrementalAuthorization(String value) { - this.value = value; - } - } + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - public enum RequestMulticapture implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - @SerializedName("never") - NEVER("never"); + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static Builder builder() { + return new Builder(); + } - RequestMulticapture(String value) { - this.value = value; - } - } + public static class Builder { + private Map extraParams; - public enum RequestOvercapture implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + private String familyName; - @SerializedName("never") - NEVER("never"); + private String givenName; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - RequestOvercapture(String value) { - this.value = value; - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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; + } - public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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; + } - @SerializedName("never") - NEVER("never"); + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + } + } - RequestPartialAuthorization(String value) { - this.value = value; - } - } + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { - @SerializedName("any") - ANY("any"), + @SerializedName("economy") + ECONOMY("economy"), - @SerializedName("automatic") - AUTOMATIC("automatic"), + @SerializedName("first_class") + FIRST_CLASS("first_class"), - @SerializedName("challenge") - CHALLENGE("challenge"); + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - RequestThreeDSecure(String value) { - this.value = value; + TicketClass(String value) { + this.value = value; + } + } } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - @SerializedName("off_session") - OFF_SESSION("off_session"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - @SerializedName("on_session") - ON_SESSION("on_session"); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CardPresent { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - CaptureMethod captureMethod; + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - /** - * Request ability to capture this payment beyond the standard authorization - * validity window. - */ - @SerializedName("request_extended_authorization") - Boolean requestExtendedAuthorization; + public static Builder builder() { + return new Builder(); + } - /** - * Request ability to increment - * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response - * to verify support. - */ - @SerializedName("request_incremental_authorization_support") - Boolean requestIncrementalAuthorizationSupport; + public static class Builder { + private String currency; - /** - * Network routing priority on co-branded EMV cards supporting domestic debit and - * international card schemes. - */ - @SerializedName("routing") - Routing routing; + private Map extraParams; - private CardPresent( - CaptureMethod captureMethod, - Map extraParams, - Boolean requestExtendedAuthorization, - Boolean requestIncrementalAuthorizationSupport, - Routing routing) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.requestExtendedAuthorization = requestExtendedAuthorization; - this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; - this.routing = routing; - } + private String insuranceCompanyName; - public static Builder builder() { - return new Builder(); - } + private InsuranceType insuranceType; - public static class Builder { - private CaptureMethod captureMethod; + private Long price; - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - private Boolean requestExtendedAuthorization; + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - private Boolean requestIncrementalAuthorizationSupport; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Routing routing; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent( - this.captureMethod, - this.extraParams, - this.requestExtendedAuthorization, - this.requestIncrementalAuthorizationSupport, - this.routing); - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.CaptureMethod - captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.CardPresent#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.CardPresent#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } } - this.extraParams.putAll(map); - return this; } - /** - * Request ability to capture this payment beyond the standard authorization - * validity window. - */ - public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { - this.requestExtendedAuthorization = requestExtendedAuthorization; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSeller { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Request ability to increment - * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response - * to verify support. - */ - public Builder setRequestIncrementalAuthorizationSupport( - Boolean requestIncrementalAuthorizationSupport) { - this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; - return this; - } + /** The references to line items for purchases with multiple associated sub-sellers. */ + @SerializedName("line_item_references") + List lineItemReferences; - /** - * Network routing priority on co-branded EMV cards supporting domestic debit and - * international card schemes. - */ - public Builder setRouting( - PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing routing) { - this.routing = routing; - return this; - } - } + /** The address of the selling or delivering merchant. */ + @SerializedName("marketplace_seller_address") + MarketplaceSellerAddress marketplaceSellerAddress; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Routing { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 marketplace seller. */ + @SerializedName("marketplace_seller_name") + String marketplaceSellerName; - /** Routing requested priority. */ - @SerializedName("requested_priority") - RequestedPriority requestedPriority; + /** The unique identifier for the marketplace seller. */ + @SerializedName("marketplace_seller_reference") + String marketplaceSellerReference; - private Routing(Map extraParams, RequestedPriority requestedPriority) { - this.extraParams = extraParams; - this.requestedPriority = requestedPriority; - } + /** The number of transactions the sub-seller completed in the last 12 months. */ + @SerializedName("number_of_transactions") + Long numberOfTransactions; - public static Builder builder() { - return new Builder(); - } + /** The category of the product. */ + @SerializedName("product_category") + ProductCategory productCategory; - public static class Builder { - private Map extraParams; + /** The date when the seller's account with the marketplace was last logged in. */ + @SerializedName("seller_last_login_at") + Long sellerLastLoginAt; - private RequestedPriority requestedPriority; + /** + * The current rating of the marketplace seller. If the marketplace uses numeric ranking, + * map these to the enum values. + */ + @SerializedName("seller_rating") + SellerRating sellerRating; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing( - this.extraParams, this.requestedPriority); - } + /** The date when the seller's account with the marketplace was created. */ + @SerializedName("seller_registered_at") + Long sellerRegisteredAt; + + /** The date when the seller's account with the marketplace was last updated. */ + @SerializedName("seller_updated_at") + Long sellerUpdatedAt; /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for the - * field documentation. + * The references to shipping addresses for purchases with multiple associated + * sub-sellers. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("shipping_references") + List shippingReferences; /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for the - * field documentation. + * The accumulated amount of sales transactions made by the sub-merchant or sub-seller + * within the past 12 months in the payment currency. These transactions are in minor + * currency units. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("volume_of_transactions") + Long volumeOfTransactions; - /** Routing requested priority. */ - public Builder setRequestedPriority( - PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority - requestedPriority) { - this.requestedPriority = requestedPriority; - return this; + private MarketplaceSeller( + Map extraParams, + List lineItemReferences, + MarketplaceSellerAddress marketplaceSellerAddress, + String marketplaceSellerName, + String marketplaceSellerReference, + Long numberOfTransactions, + ProductCategory productCategory, + Long sellerLastLoginAt, + SellerRating sellerRating, + Long sellerRegisteredAt, + Long sellerUpdatedAt, + List shippingReferences, + Long volumeOfTransactions) { + this.extraParams = extraParams; + this.lineItemReferences = lineItemReferences; + this.marketplaceSellerAddress = marketplaceSellerAddress; + this.marketplaceSellerName = marketplaceSellerName; + this.marketplaceSellerReference = marketplaceSellerReference; + this.numberOfTransactions = numberOfTransactions; + this.productCategory = productCategory; + this.sellerLastLoginAt = sellerLastLoginAt; + this.sellerRating = sellerRating; + this.sellerRegisteredAt = sellerRegisteredAt; + this.sellerUpdatedAt = sellerUpdatedAt; + this.shippingReferences = shippingReferences; + this.volumeOfTransactions = volumeOfTransactions; } - } - - public enum RequestedPriority implements ApiRequestParams.EnumParam { - @SerializedName("domestic") - DOMESTIC("domestic"), - @SerializedName("international") - INTERNATIONAL("international"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private Map extraParams; - RequestedPriority(String value) { - this.value = value; - } - } - } + private List lineItemReferences; - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"), + private MarketplaceSellerAddress marketplaceSellerAddress; - @SerializedName("manual_preferred") - MANUAL_PREFERRED("manual_preferred"); + private String marketplaceSellerName; - @Getter(onMethod_ = {@Override}) - private final String value; + private String marketplaceSellerReference; - CaptureMethod(String value) { - this.value = value; - } - } - } + private Long numberOfTransactions; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Cashapp { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + private ProductCategory productCategory; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Long sellerLastLoginAt; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + private SellerRating sellerRating; - private Cashapp( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Long sellerRegisteredAt; - public static Builder builder() { - return new Builder(); - } + private Long sellerUpdatedAt; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private List shippingReferences; - private Map extraParams; + private Long volumeOfTransactions; - private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller( + this.extraParams, + this.lineItemReferences, + this.marketplaceSellerAddress, + this.marketplaceSellerName, + this.marketplaceSellerReference, + this.numberOfTransactions, + this.productCategory, + this.sellerLastLoginAt, + this.sellerRating, + this.sellerRegisteredAt, + this.sellerUpdatedAt, + this.shippingReferences, + this.volumeOfTransactions); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Cashapp build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Cashapp( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** + * Add an element to `lineItemReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addLineItemReference(String element) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.add(element); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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 elements to `lineItemReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addAllLineItemReference(List elements) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.addAll(elements); + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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; - } + /** The address of the selling or delivering merchant. */ + public Builder setMarketplaceSellerAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.MarketplaceSellerAddress + marketplaceSellerAddress) { + this.marketplaceSellerAddress = marketplaceSellerAddress; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Cashapp.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(String marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + 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; - } - } + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(String marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** The number of transactions the sub-seller completed in the last 12 months. */ + public Builder setNumberOfTransactions(Long numberOfTransactions) { + this.numberOfTransactions = numberOfTransactions; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The category of the product. */ + public Builder setProductCategory( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.ProductCategory + productCategory) { + this.productCategory = productCategory; + return this; + } - CaptureMethod(String value) { - this.value = value; - } - } + /** The date when the seller's account with the marketplace was last logged in. */ + public Builder setSellerLastLoginAt(Long sellerLastLoginAt) { + this.sellerLastLoginAt = sellerLastLoginAt; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** + * The current rating of the marketplace seller. If the marketplace uses numeric + * ranking, map these to the enum values. + */ + public Builder setSellerRating( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.SellerRating + sellerRating) { + this.sellerRating = sellerRating; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** The date when the seller's account with the marketplace was created. */ + public Builder setSellerRegisteredAt(Long sellerRegisteredAt) { + this.sellerRegisteredAt = sellerRegisteredAt; + return this; + } - @SerializedName("on_session") - ON_SESSION("on_session"); + /** The date when the seller's account with the marketplace was last updated. */ + public Builder setSellerUpdatedAt(Long sellerUpdatedAt) { + this.sellerUpdatedAt = sellerUpdatedAt; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add an element to `shippingReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addShippingReference(String element) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.add(element); + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** + * Add all elements to `shippingReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addAllShippingReference(List elements) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.addAll(elements); + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Crypto { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 accumulated amount of sales transactions made by the sub-merchant or sub-seller + * within the past 12 months in the payment currency. These transactions are in minor + * currency units. + */ + public Builder setVolumeOfTransactions(Long volumeOfTransactions) { + this.volumeOfTransactions = volumeOfTransactions; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSellerAddress { + /** The city or town. */ + @SerializedName("city") + String city; - private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private MarketplaceSellerAddress( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - private SetupFutureUsage setupFutureUsage; + public static Builder builder() { + return new Builder(); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Crypto build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Crypto( - this.extraParams, this.setupFutureUsage); - } + public static class Builder { + private String city; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Crypto#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private String country; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Crypto#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Crypto.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private String postalCode; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private String region; - @Getter(onMethod_ = {@Override}) - private final String value; + private String streetAddress; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private String streetAddress2; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CustomerBalance { - /** - * Configuration for the bank transfer funding type, if the {@code funding_type} is set to - * {@code bank_transfer}. - */ - @SerializedName("bank_transfer") - BankTransfer bankTransfer; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.MarketplaceSellerAddress + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** - * The funding method type to be used when there are not enough funds in the customer balance. - * Permitted values include: {@code bank_transfer}. - */ - @SerializedName("funding_type") - FundingType fundingType; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private CustomerBalance( - BankTransfer bankTransfer, - Map extraParams, - FundingType fundingType, - SetupFutureUsage setupFutureUsage) { - this.bankTransfer = bankTransfer; - this.extraParams = extraParams; - this.fundingType = fundingType; - this.setupFutureUsage = setupFutureUsage; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - public static class Builder { - private BankTransfer bankTransfer; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - private Map extraParams; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } - private FundingType fundingType; + public enum ProductCategory implements ApiRequestParams.EnumParam { + @SerializedName("accessories") + ACCESSORIES("accessories"), - private SetupFutureUsage setupFutureUsage; + @SerializedName("appliances") + APPLIANCES("appliances"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance( - this.bankTransfer, this.extraParams, this.fundingType, this.setupFutureUsage); - } + @SerializedName("apps_and_games") + APPS_AND_GAMES("apps_and_games"), - /** - * Configuration for the bank transfer funding type, if the {@code funding_type} is set to - * {@code bank_transfer}. - */ - public Builder setBankTransfer( - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - bankTransfer) { - this.bankTransfer = bankTransfer; - return this; - } + @SerializedName("arts_crafts_and_sewing") + ARTS_CRAFTS_AND_SEWING("arts_crafts_and_sewing"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.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; - } + @SerializedName("automotive") + AUTOMOTIVE("automotive"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.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; - } + @SerializedName("baby") + BABY("baby"), - /** - * The funding method type to be used when there are not enough funds in the customer - * balance. Permitted values include: {@code bank_transfer}. - */ - public Builder setFundingType( - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.FundingType - fundingType) { - this.fundingType = fundingType; - return this; - } + @SerializedName("baby_clothing") + BABY_CLOTHING("baby_clothing"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @SerializedName("bags_and_purses") + BAGS_AND_PURSES("bags_and_purses"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BankTransfer { - /** Configuration for the eu_bank_transfer funding type. */ - @SerializedName("eu_bank_transfer") - EuBankTransfer euBankTransfer; + @SerializedName("beauty") + BEAUTY("beauty"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("books") + BOOKS("books"), - /** - * List of address types that should be returned in the financial_addresses response. If not - * specified, all valid types will be returned. - * - *

Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code - * spei}. - */ - @SerializedName("requested_address_types") - List< - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes; + @SerializedName("cds_and_vinyl") + CDS_AND_VINYL("cds_and_vinyl"), - /** - * Required. The list of bank transfer types that this PaymentIntent is - * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code - * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code - * us_bank_transfer}. - */ - @SerializedName("type") - Type type; + @SerializedName("cell_phones_and_accessories") + CELL_PHONES_AND_ACCESSORIES("cell_phones_and_accessories"), - private BankTransfer( - EuBankTransfer euBankTransfer, - Map extraParams, - List< - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes, - Type type) { - this.euBankTransfer = euBankTransfer; - this.extraParams = extraParams; - this.requestedAddressTypes = requestedAddressTypes; - this.type = type; - } + @SerializedName("collectibles_and_fine_arts") + COLLECTIBLES_AND_FINE_ARTS("collectibles_and_fine_arts"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("digital_music") + DIGITAL_MUSIC("digital_music"), - public static class Builder { - private EuBankTransfer euBankTransfer; + @SerializedName("electronics") + ELECTRONICS("electronics"), - private Map extraParams; + @SerializedName("grocery_and_gourmet_food") + GROCERY_AND_GOURMET_FOOD("grocery_and_gourmet_food"), - private List< - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes; + @SerializedName("handmade") + HANDMADE("handmade"), - private Type type; + @SerializedName("health_and_personal_care") + HEALTH_AND_PERSONAL_CARE("health_and_personal_care"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer( - this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); - } + @SerializedName("home_and_kitchen") + HOME_AND_KITCHEN("home_and_kitchen"), - /** Configuration for the eu_bank_transfer funding type. */ - public Builder setEuBankTransfer( - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer - euBankTransfer) { - this.euBankTransfer = euBankTransfer; - return this; - } + @SerializedName("industrial_and_scientific") + INDUSTRIAL_AND_SCIENTIFIC("industrial_and_scientific"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("luggage_and_travel_gear") + LUGGAGE_AND_TRAVEL_GEAR("luggage_and_travel_gear"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("magazine_subscriptions") + MAGAZINE_SUBSCRIPTIONS("magazine_subscriptions"), - /** - * Add an element to `requestedAddressTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} - * for the field documentation. - */ - public Builder addRequestedAddressType( - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType - element) { - if (this.requestedAddressTypes == null) { - this.requestedAddressTypes = new ArrayList<>(); - } - this.requestedAddressTypes.add(element); - return this; - } + @SerializedName("men_clothing") + MEN_CLOTHING("men_clothing"), - /** - * Add all elements to `requestedAddressTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} - * for the field documentation. - */ - public Builder addAllRequestedAddressType( - List< - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - elements) { - if (this.requestedAddressTypes == null) { - this.requestedAddressTypes = new ArrayList<>(); + @SerializedName("musical_instruments") + MUSICAL_INSTRUMENTS("musical_instruments"), + + @SerializedName("office_products") + OFFICE_PRODUCTS("office_products"), + + @SerializedName("patio_lawn_and_garden") + PATIO_LAWN_AND_GARDEN("patio_lawn_and_garden"), + + @SerializedName("pet_supplies") + PET_SUPPLIES("pet_supplies"), + + @SerializedName("shoes") + SHOES("shoes"), + + @SerializedName("software") + SOFTWARE("software"), + + @SerializedName("sports_and_outdoors") + SPORTS_AND_OUTDOORS("sports_and_outdoors"), + + @SerializedName("tools_and_home_improvement") + TOOLS_AND_HOME_IMPROVEMENT("tools_and_home_improvement"), + + @SerializedName("toys_and_games") + TOYS_AND_GAMES("toys_and_games"), + + @SerializedName("video_games") + VIDEO_GAMES("video_games"), + + @SerializedName("women_clothing") + WOMEN_CLOTHING("women_clothing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductCategory(String value) { + this.value = value; } - this.requestedAddressTypes.addAll(elements); - return this; } - /** - * Required. The list of bank transfer types that this PaymentIntent is - * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code - * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code - * us_bank_transfer}. - */ - public Builder setType( - PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.Type - type) { - this.type = type; - return this; + public enum SellerRating implements ApiRequestParams.EnumParam { + @SerializedName("high") + HIGH("high"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("medium") + MEDIUM("medium"), + + @SerializedName("very_high") + VERY_HIGH("very_high"), + + @SerializedName("very_low") + VERY_LOW("very_low"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SellerRating(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class EuBankTransfer { - /** - * Required. The desired country code of the bank account information. - * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, - * or {@code NL}. - */ - @SerializedName("country") - String country; + public static class RoundTripReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; + + /** Currency. */ + @SerializedName("currency") + String currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; /** * Map of extra parameters for custom features not available in this client library. The @@ -21642,9 +34174,55 @@ public static class EuBankTransfer { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private EuBankTransfer(String country, Map extraParams) { - this.country = country; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private RoundTripReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances, + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } public static Builder builder() { @@ -21652,25 +34230,83 @@ public static Builder builder() { } public static class Builder { - private String country; + private String affiliateName; + + private Arrival arrival; + + private String carrierName; + + private String currency; + + private Departure departure; private Map extraParams; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance> + insurances; + + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer(this.country, this.extraParams); + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); } - /** - * Required. The desired country code of the bank account information. - * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, - * or {@code NL}. - */ - public Builder setCountry(String country) { - this.country = country; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure + departure) { + this.departure = departure; return this; } @@ -21678,7 +34314,7 @@ public Builder setCountry(String country) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -21693,7 +34329,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -21703,1969 +34339,1962 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } } - } - public enum RequestedAddressType implements ApiRequestParams.EnumParam { - @SerializedName("aba") - ABA("aba"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - @SerializedName("iban") - IBAN("iban"), + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; - @SerializedName("sepa") - SEPA("sepa"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("sort_code") - SORT_CODE("sort_code"), + private Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - @SerializedName("spei") - SPEI("spei"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("swift") - SWIFT("swift"), + public static class Builder { + private Address address; - @SerializedName("zengin") - ZENGIN("zengin"); + private String arrivalLocation; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - RequestedAddressType(String value) { - this.value = value; - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("eu_bank_transfer") - EU_BANK_TRANSFER("eu_bank_transfer"), + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - @SerializedName("gb_bank_transfer") - GB_BANK_TRANSFER("gb_bank_transfer"), + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - @SerializedName("jp_bank_transfer") - JP_BANK_TRANSFER("jp_bank_transfer"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("mx_bank_transfer") - MX_BANK_TRANSFER("mx_bank_transfer"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - @SerializedName("us_bank_transfer") - US_BANK_TRANSFER("us_bank_transfer"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - Type(String value) { - this.value = value; - } - } - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - public enum FundingType implements ApiRequestParams.EnumParam { - @SerializedName("bank_transfer") - BANK_TRANSFER("bank_transfer"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private String city; - FundingType(String value) { - this.value = value; - } - } + private String country; + + private Map extraParams; + + private String postalCode; + + private String region; + + private String streetAddress; + + private String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class 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; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - public static Builder builder() { - return new Builder(); - } + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - public static class Builder { - private Map extraParams; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private SetupFutureUsage setupFutureUsage; + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Eps build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Eps( - this.extraParams, this.setupFutureUsage); - } + public static Builder builder() { + return new Builder(); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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; - } + public static class Builder { + private Address address; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.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; - } + private Long departsAt; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Eps.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private String departureLocation; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Fpx { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - public static class Builder { - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - private SetupFutureUsage setupFutureUsage; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Fpx build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Fpx( - this.extraParams, this.setupFutureUsage); - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Fpx#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Fpx#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + public static class Builder { + private String city; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Fpx.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private String country; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private String postalCode; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private String region; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Giropay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private String streetAddress; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + private String streetAddress2; - private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - public static Builder builder() { - return new Builder(); - } + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - public static class Builder { - private Map extraParams; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Giropay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Giropay( - this.extraParams, this.setupFutureUsage); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Giropay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Giropay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } } - this.extraParams.putAll(map); - return this; - } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Giropay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + public static Builder builder() { + return new Builder(); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Gopay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private String currency; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + private Map extraParams; - private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private String insuranceCompanyName; + + private InsuranceType insuranceType; + + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - public static class Builder { - private Map extraParams; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Gopay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Gopay( - this.extraParams, this.setupFutureUsage); - } + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Gopay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Gopay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Gopay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @SerializedName("emergency") + EMERGENCY("emergency"), - @SerializedName("off_session") - OFF_SESSION("off_session"); + @SerializedName("medical") + MEDICAL("medical"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + InsuranceType(String value) { + this.value = value; + } + } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Grabpay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - public static Builder builder() { - return new Builder(); - } + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - public static class Builder { - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private SetupFutureUsage setupFutureUsage; + public static class Builder { + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Grabpay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Grabpay( - this.extraParams, this.setupFutureUsage); - } + private String familyName; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Grabpay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private String givenName; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Grabpay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Grabpay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class IdBankTransfer { - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 - * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - */ - @SerializedName("expires_after") - Long expiresAfter; + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * now until 30 days from now. If unset, it defaults to 1 days from now. - */ - @SerializedName("expires_at") - Long expiresAt; + @SerializedName("economy") + ECONOMY("economy"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - private IdBankTransfer( - Long expiresAfter, - Long expiresAt, - Map extraParams, - SetupFutureUsage setupFutureUsage) { - this.expiresAfter = expiresAfter; - this.expiresAt = expiresAt; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + @Getter(onMethod_ = {@Override}) + private final String value; - public static Builder builder() { - return new Builder(); - } + TicketClass(String value) { + this.value = value; + } + } + } - public static class Builder { - private Long expiresAfter; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TrainReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + String affiliateName; - private Long expiresAt; + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - private Map extraParams; + /** Name of transportation company. */ + @SerializedName("carrier_name") + String carrierName; - private SetupFutureUsage setupFutureUsage; + /** Currency. */ + @SerializedName("currency") + String currency; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer( - this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); - } + /** Departure details. */ + @SerializedName("departure") + Departure departure; - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - */ - public Builder setExpiresAfter(Long expiresAfter) { - this.expiresAfter = expiresAfter; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * now until 30 days from now. If unset, it defaults to 1 days from now. - */ - public Builder setExpiresAt(Long expiresAt) { - this.expiresAt = expiresAt; - return this; - } + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance> + insurances; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private TrainReservationDetail( + String affiliateName, + Arrival arrival, + String carrierName, + String currency, + Departure departure, + Map extraParams, + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances, + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } - - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private String affiliateName; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Arrival arrival; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Ideal { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private String carrierName; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + private String currency; - private Ideal(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Departure departure; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance> + insurances; - private ApiRequestParams.EnumParam setupFutureUsage; + private List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger> + passengers; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Ideal build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Ideal( - this.extraParams, this.setupFutureUsage); - } + private Long price; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Ideal#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private TicketClass ticketClass; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Ideal#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Ideal.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + 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; - } - } + /** Arrival details. */ + public Builder setArrival( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Departure details. */ + public Builder setDeparture( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure + departure) { + this.departure = departure; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class InteracPresent { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private InteracPresent(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } - public static class Builder { - private Map extraParams; + /** + * 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger + element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent( - this.extraParams); - } + /** + * 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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.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 - * PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.InteracPresent#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KakaoPay { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + String arrivalLocation; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply - * with regional legislation and network rules, such as SCA. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 KakaoPay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Arrival( + Address address, String arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - public static Builder builder() { - return new Builder(); - } + public static Builder builder() { + return new Builder(); + } - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + public static class Builder { + private Address address; - private Map extraParams; + private String arrivalLocation; - private ApiRequestParams.EnumParam setupFutureUsage; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static Builder builder() { + return new Builder(); + } - CaptureMethod(String value) { - this.value = value; - } - } + public static class Builder { + private String city; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + private String country; - @SerializedName("off_session") - OFF_SESSION("off_session"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private String postalCode; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private String region; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Klarna { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + private String streetAddress; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 String streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** On-demand details if setting up or charging an on-demand payment. */ - @SerializedName("on_demand") - OnDemand onDemand; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** Preferred language of the Klarna authorization page that the customer is redirected to. */ - @SerializedName("preferred_locale") - PreferredLocale preferredLocale; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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; + } - /** Subscription details if setting up or charging a subscription. */ - @SerializedName("subscriptions") - Object subscriptions; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - private Klarna( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - OnDemand onDemand, - PreferredLocale preferredLocale, - SetupFutureUsage setupFutureUsage, - Object subscriptions) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.onDemand = onDemand; - this.preferredLocale = preferredLocale; - this.setupFutureUsage = setupFutureUsage; - this.subscriptions = subscriptions; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - private OnDemand onDemand; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - private PreferredLocale preferredLocale; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + String departureLocation; - private SetupFutureUsage setupFutureUsage; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Object subscriptions; + private Departure( + Address address, + Long departsAt, + String departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Klarna build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna( - this.captureMethod, - this.extraParams, - this.onDemand, - this.preferredLocale, - this.setupFutureUsage, - this.subscriptions); - } + public static Builder builder() { + return new Builder(); + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentCreateParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + public static class Builder { + private Address address; - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + private Long departsAt; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Klarna#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private String departureLocation; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Klarna#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private Map extraParams; - /** On-demand details if setting up or charging an on-demand payment. */ - public Builder setOnDemand( - PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { - this.onDemand = onDemand; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - /** - * Preferred language of the Klarna authorization page that the customer is redirected to. - */ - public Builder setPreferredLocale( - PaymentIntentCreateParams.PaymentMethodOptions.Klarna.PreferredLocale preferredLocale) { - this.preferredLocale = preferredLocale; - return this; - } + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - /** - * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the field - * documentation. - */ - @SuppressWarnings("unchecked") - public Builder addSubscription( - PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription element) { - if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { - this.subscriptions = - new ArrayList(); - } - ((List) - this.subscriptions) - .add(element); - return this; - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - /** - * Add all elements to `subscriptions` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link PaymentIntentCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the - * field documentation. - */ - @SuppressWarnings("unchecked") - public Builder addAllSubscription( - List elements) { - if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { - this.subscriptions = - new ArrayList(); - } - ((List) - this.subscriptions) - .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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - /** Subscription details if setting up or charging a subscription. */ - public Builder setSubscriptions(EmptyParam subscriptions) { - this.subscriptions = subscriptions; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + String city; - /** Subscription details if setting up or charging a subscription. */ - public Builder setSubscriptions( - List - subscriptions) { - this.subscriptions = subscriptions; - return this; - } - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + String country; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class OnDemand { - /** - * Your average amount value. You can use a value across your customer base, or segment - * based on customer type, country, etc. - */ - @SerializedName("average_amount") - Long averageAmount; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + String postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + String region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + String streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + String streetAddress2; + + private Address( + String city, + String country, + Map extraParams, + String postalCode, + String region, + String streetAddress, + String streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - /** - * The maximum value you may charge a customer per purchase. You can use a value across your - * customer base, or segment based on customer type, country, etc. - */ - @SerializedName("maximum_amount") - Long maximumAmount; + public static class Builder { + private String city; - /** - * The lowest or minimum value you may charge a customer per purchase. You can use a value - * across your customer base, or segment based on customer type, country, etc. - */ - @SerializedName("minimum_amount") - Long minimumAmount; + private String country; - /** Interval at which the customer is making purchases. */ - @SerializedName("purchase_interval") - PurchaseInterval purchaseInterval; + private Map extraParams; - /** The number of {@code purchase_interval} between charges. */ - @SerializedName("purchase_interval_count") - Long purchaseIntervalCount; + private String postalCode; - private OnDemand( - Long averageAmount, - Map extraParams, - Long maximumAmount, - Long minimumAmount, - PurchaseInterval purchaseInterval, - Long purchaseIntervalCount) { - this.averageAmount = averageAmount; - this.extraParams = extraParams; - this.maximumAmount = maximumAmount; - this.minimumAmount = minimumAmount; - this.purchaseInterval = purchaseInterval; - this.purchaseIntervalCount = purchaseIntervalCount; - } + private String region; - public static Builder builder() { - return new Builder(); - } + private String streetAddress; - public static class Builder { - private Long averageAmount; + private String streetAddress2; - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - private Long maximumAmount; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private Long minimumAmount; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private PurchaseInterval purchaseInterval; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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; + } - private Long purchaseIntervalCount; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand( - this.averageAmount, - this.extraParams, - this.maximumAmount, - this.minimumAmount, - this.purchaseInterval, - this.purchaseIntervalCount); - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Your average amount value. You can use a value across your customer base, or segment - * based on customer type, country, etc. - */ - public Builder setAverageAmount(Long averageAmount) { - this.averageAmount = averageAmount; - return this; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } } - this.extraParams.putAll(map); - return this; } - /** - * The maximum value you may charge a customer per purchase. You can use a value across - * your customer base, or segment based on customer type, country, etc. - */ - public Builder setMaximumAmount(Long maximumAmount) { - this.maximumAmount = maximumAmount; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + String currency; - /** - * The lowest or minimum value you may charge a customer per purchase. You can use a value - * across your customer base, or segment based on customer type, country, etc. - */ - public Builder setMinimumAmount(Long minimumAmount) { - this.minimumAmount = minimumAmount; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Interval at which the customer is making purchases. */ - public Builder setPurchaseInterval( - PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval - purchaseInterval) { - this.purchaseInterval = purchaseInterval; - return this; - } + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + String currency, + Map extraParams, + String insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - /** The number of {@code purchase_interval} between charges. */ - public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { - this.purchaseIntervalCount = purchaseIntervalCount; - return this; - } - } + public static Builder builder() { + return new Builder(); + } - public enum PurchaseInterval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + public static class Builder { + private String currency; - @SerializedName("month") - MONTH("month"), + private Map extraParams; - @SerializedName("week") - WEEK("week"), + private String insuranceCompanyName; - @SerializedName("year") - YEAR("year"); + private InsuranceType insuranceType; - @Getter(onMethod_ = {@Override}) - private final String value; + private Long price; - PurchaseInterval(String value) { - this.value = value; - } - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Subscription { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** Required. Unit of time between subscription charges. */ - @SerializedName("interval") - Interval interval; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * The number of intervals (specified in the {@code interval} attribute) between - * subscription charges. For example, {@code interval=month} and {@code interval_count=3} - * charges every 3 months. - */ - @SerializedName("interval_count") - Long intervalCount; + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** Name for subscription. */ - @SerializedName("name") - String name; + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - /** Describes the upcoming charge for this subscription. */ - @SerializedName("next_billing") - NextBilling nextBilling; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** - * Required. A non-customer-facing reference to correlate subscription - * charges in the Klarna app. Use a value that persists across subscription charges. - */ - @SerializedName("reference") - String reference; + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - private Subscription( - Map extraParams, - Interval interval, - Long intervalCount, - String name, - NextBilling nextBilling, - String reference) { - this.extraParams = extraParams; - this.interval = interval; - this.intervalCount = intervalCount; - this.name = name; - this.nextBilling = nextBilling; - this.reference = reference; - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("emergency") + EMERGENCY("emergency"), - public static class Builder { - private Map extraParams; + @SerializedName("medical") + MEDICAL("medical"); - private Interval interval; + @Getter(onMethod_ = {@Override}) + private final String value; - private Long intervalCount; + InsuranceType(String value) { + this.value = value; + } + } + } - private String name; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - private NextBilling nextBilling; + /** The family name of the person. */ + @SerializedName("family_name") + String familyName; - private String reference; + /** The given name of the person. */ + @SerializedName("given_name") + String givenName; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription( - this.extraParams, - this.interval, - this.intervalCount, - this.name, - this.nextBilling, - this.reference); - } + private Passenger( + Map extraParams, String familyName, String givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static class Builder { + private Map extraParams; + + private String familyName; + + private String givenName; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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 + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } } - this.extraParams.putAll(map); - return this; } - /** Required. Unit of time between subscription charges. */ - public Builder setInterval( - PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.Interval - interval) { - this.interval = interval; - return this; - } + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * The number of intervals (specified in the {@code interval} attribute) between - * subscription charges. For example, {@code interval=month} and {@code interval_count=3} - * charges every 3 months. - */ - public Builder setIntervalCount(Long intervalCount) { - this.intervalCount = intervalCount; - return this; - } + @SerializedName("economy") + ECONOMY("economy"), - /** Name for subscription. */ - public Builder setName(String name) { - this.name = name; - return this; - } + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** Describes the upcoming charge for this subscription. */ - public Builder setNextBilling( - PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling - nextBilling) { - this.nextBilling = nextBilling; - return this; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * Required. A non-customer-facing reference to correlate subscription - * charges in the Klarna app. Use a value that persists across subscription charges. - */ - public Builder setReference(String reference) { - this.reference = reference; - return this; + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class NextBilling { - /** Required. The amount of the next charge for the subscription. */ - @SerializedName("amount") - Long amount; + public static class Voucher { + /** Name of associated or partner company for this voucher. */ + @SerializedName("affiliate_name") + String affiliateName; - /** - * Required. The date of the next charge for the subscription in - * YYYY-MM-DD format. - */ - @SerializedName("date") - String date; + /** The voucher validity end time. */ + @SerializedName("ends_at") + Long endsAt; /** * Map of extra parameters for custom features not available in this client library. The @@ -23677,10 +36306,37 @@ public static class NextBilling { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private NextBilling(Long amount, String date, Map extraParams) { - this.amount = amount; - this.date = date; + /** The voucher validity start time. */ + @SerializedName("starts_at") + Long startsAt; + + /** The issuer or provider of this voucher. */ + @SerializedName("voucher_company") + String voucherCompany; + + /** The name or reference to identify the voucher. */ + @SerializedName("voucher_name") + String voucherName; + + /** The type of this voucher. */ + @SerializedName("voucher_type") + VoucherType voucherType; + + private Voucher( + String affiliateName, + Long endsAt, + Map extraParams, + Long startsAt, + String voucherCompany, + String voucherName, + VoucherType voucherType) { + this.affiliateName = affiliateName; + this.endsAt = endsAt; this.extraParams = extraParams; + this.startsAt = startsAt; + this.voucherCompany = voucherCompany; + this.voucherName = voucherName; + this.voucherType = voucherType; } public static Builder builder() { @@ -23688,31 +36344,44 @@ public static Builder builder() { } public static class Builder { - private Long amount; + private String affiliateName; - private String date; + private Long endsAt; private Map extraParams; + private Long startsAt; + + private String voucherCompany; + + private String voucherName; + + private VoucherType voucherType; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription - .NextBilling(this.amount, this.date, this.extraParams); + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher( + this.affiliateName, + this.endsAt, + this.extraParams, + this.startsAt, + this.voucherCompany, + this.voucherName, + this.voucherType); } - /** Required. The amount of the next charge for the subscription. */ - public Builder setAmount(Long amount) { - this.amount = amount; + /** Name of associated or partner company for this voucher. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; return this; } - /** - * Required. The date of the next charge for the subscription in - * YYYY-MM-DD format. - */ - public Builder setDate(String date) { - this.date = date; + /** The voucher validity end time. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; return this; } @@ -23720,7 +36389,7 @@ public Builder setDate(String date) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -23735,7 +36404,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -23745,27 +36414,57 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The voucher validity start time. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + + /** The issuer or provider of this voucher. */ + public Builder setVoucherCompany(String voucherCompany) { + this.voucherCompany = voucherCompany; + return this; + } + + /** The name or reference to identify the voucher. */ + public Builder setVoucherName(String voucherName) { + this.voucherName = voucherName; + return this; + } + + /** The type of this voucher. */ + public Builder setVoucherType( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher.VoucherType + voucherType) { + this.voucherType = voucherType; + return this; + } } - } - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + public enum VoucherType implements ApiRequestParams.EnumParam { + @SerializedName("digital_product") + DIGITAL_PRODUCT("digital_product"), - @SerializedName("month") - MONTH("month"), + @SerializedName("discount") + DISCOUNT("discount"), - @SerializedName("week") - WEEK("week"), + @SerializedName("gift_card") + GIFT_CARD("gift_card"), - @SerializedName("year") - YEAR("year"); + @SerializedName("physical_product") + PHYSICAL_PRODUCT("physical_product"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("services") + SERVICES("services"); - Interval(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + VoucherType(String value) { + this.value = value; + } } } } diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 495d1d1bfcc..134a0b441e3 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -2926,6 +2926,10 @@ public static class PaymentDetails { @SerializedName("car_rental") CarRental carRental; + /** Car rental data for this PaymentIntent. */ + @SerializedName("car_rental_data") + Object carRentalData; + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -2952,10 +2956,18 @@ public static class PaymentDetails { @SerializedName("flight") Flight flight; + /** Flight data for this PaymentIntent. */ + @SerializedName("flight_data") + Object flightData; + /** Lodging reservation details for this PaymentIntent. */ @SerializedName("lodging") Lodging lodging; + /** Lodging data for this PaymentIntent. */ + @SerializedName("lodging_data") + Object lodgingData; + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -2977,19 +2989,25 @@ public static class PaymentDetails { private PaymentDetails( CarRental carRental, + Object carRentalData, Object customerReference, EventDetails eventDetails, Map extraParams, Flight flight, + Object flightData, Lodging lodging, + Object lodgingData, Object orderReference, Subscription subscription) { this.carRental = carRental; + this.carRentalData = carRentalData; this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; this.flight = flight; + this.flightData = flightData; this.lodging = lodging; + this.lodgingData = lodgingData; this.orderReference = orderReference; this.subscription = subscription; } @@ -3001,6 +3019,8 @@ public static Builder builder() { public static class Builder { private CarRental carRental; + private Object carRentalData; + private Object customerReference; private EventDetails eventDetails; @@ -3009,8 +3029,12 @@ public static class Builder { private Flight flight; + private Object flightData; + private Lodging lodging; + private Object lodgingData; + private Object orderReference; private Subscription subscription; @@ -3019,11 +3043,14 @@ public static class Builder { public PaymentIntentUpdateParams.PaymentDetails build() { return new PaymentIntentUpdateParams.PaymentDetails( this.carRental, + this.carRentalData, this.customerReference, this.eventDetails, this.extraParams, this.flight, + this.flightData, this.lodging, + this.lodgingData, this.orderReference, this.subscription); } @@ -3034,6 +3061,53 @@ public Builder setCarRental(PaymentIntentUpdateParams.PaymentDetails.CarRental c return this; } + /** + * Add an element to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCarRentalData( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData element) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = + new ArrayList(); + } + ((List) this.carRentalData) + .add(element); + return this; + } + + /** + * Add all elements to `carRentalData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails#carRentalData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCarRentalData( + List elements) { + if (this.carRentalData == null || this.carRentalData instanceof EmptyParam) { + this.carRentalData = + new ArrayList(); + } + ((List) this.carRentalData) + .addAll(elements); + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData(EmptyParam carRentalData) { + this.carRentalData = carRentalData; + return this; + } + + /** Car rental data for this PaymentIntent. */ + public Builder setCarRentalData( + List carRentalData) { + this.carRentalData = carRentalData; + return this; + } + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -3096,12 +3170,99 @@ public Builder setFlight(PaymentIntentUpdateParams.PaymentDetails.Flight flight) return this; } + /** + * Add an element to `flightData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFlightData(PaymentIntentUpdateParams.PaymentDetails.FlightData element) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData).add(element); + return this; + } + + /** + * Add all elements to `flightData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails#flightData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFlightData( + List elements) { + if (this.flightData == null || this.flightData instanceof EmptyParam) { + this.flightData = new ArrayList(); + } + ((List) this.flightData) + .addAll(elements); + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData(EmptyParam flightData) { + this.flightData = flightData; + return this; + } + + /** Flight data for this PaymentIntent. */ + public Builder setFlightData( + List flightData) { + this.flightData = flightData; + return this; + } + /** Lodging reservation details for this PaymentIntent. */ public Builder setLodging(PaymentIntentUpdateParams.PaymentDetails.Lodging lodging) { this.lodging = lodging; return this; } + /** + * Add an element to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLodgingData(PaymentIntentUpdateParams.PaymentDetails.LodgingData element) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData) + .add(element); + return this; + } + + /** + * Add all elements to `lodgingData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails#lodgingData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLodgingData( + List elements) { + if (this.lodgingData == null || this.lodgingData instanceof EmptyParam) { + this.lodgingData = new ArrayList(); + } + ((List) this.lodgingData) + .addAll(elements); + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData(EmptyParam lodgingData) { + this.lodgingData = lodgingData; + return this; + } + + /** Lodging data for this PaymentIntent. */ + public Builder setLodgingData( + List lodgingData) { + this.lodgingData = lodgingData; + return this; + } + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -4671,30 +4832,38 @@ public enum RateInterval implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - 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. */ + public static class CarRentalData { + /** Affiliate (such as travel agency) details for the rental. */ @SerializedName("affiliate") Affiliate affiliate; - /** The name of the company. */ - @SerializedName("company") - Object company; + /** Booking confirmation number for the car rental. */ + @SerializedName("booking_number") + Object bookingNumber; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + /** Name of the car rental company. */ + @SerializedName("carrier_name") + Object carrierName; - /** Event end time. Measured in seconds since the Unix epoch. */ - @SerializedName("ends_at") - Long endsAt; + /** Customer service phone number for the car rental company. */ + @SerializedName("customer_service_phone_number") + Object customerServicePhoneNumber; + + /** Number of days the car is being rented. */ + @SerializedName("days_rented") + Long daysRented; + + /** Distance details for the rental. */ + @SerializedName("distance") + Distance distance; + + /** List of drivers for the rental. */ + @SerializedName("drivers") + List drivers; + + /** Required. Drop-off location details. */ + @SerializedName("drop_off") + DropOff dropOff; /** * Map of extra parameters for custom features not available in this client library. The @@ -4705,39 +4874,61 @@ public static class EventDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Type of the event entertainment (concert, sports event etc). */ - @SerializedName("genre") - Object genre; + /** Insurance details for the rental. */ + @SerializedName("insurances") + List insurances; - /** Required. The name of the event. */ - @SerializedName("name") - Object name; + /** Indicates if the customer was a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; - /** Event start time. Measured in seconds since the Unix epoch. */ - @SerializedName("starts_at") - Long startsAt; + /** Required. Pickup location details. */ + @SerializedName("pickup") + Pickup pickup; - private EventDetails( - Boolean accessControlledVenue, - Address address, + /** Name of the person renting the vehicle. */ + @SerializedName("renter_name") + Object renterName; + + /** Required. Total cost breakdown for the rental. */ + @SerializedName("total") + Total total; + + /** Vehicle details for the rental. */ + @SerializedName("vehicle") + Vehicle vehicle; + + private CarRentalData( Affiliate affiliate, - Object company, - Delivery delivery, - Long endsAt, + Object bookingNumber, + Object carrierName, + Object customerServicePhoneNumber, + Long daysRented, + Distance distance, + List drivers, + DropOff dropOff, Map extraParams, - Object genre, - Object name, - Long startsAt) { - this.accessControlledVenue = accessControlledVenue; - this.address = address; + List insurances, + Boolean noShowIndicator, + Pickup pickup, + Object renterName, + Total total, + Vehicle vehicle) { this.affiliate = affiliate; - this.company = company; - this.delivery = delivery; - this.endsAt = endsAt; + this.bookingNumber = bookingNumber; + this.carrierName = carrierName; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.daysRented = daysRented; + this.distance = distance; + this.drivers = drivers; + this.dropOff = dropOff; this.extraParams = extraParams; - this.genre = genre; - this.name = name; - this.startsAt = startsAt; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.pickup = pickup; + this.renterName = renterName; + this.total = total; + this.vehicle = vehicle; } public static Builder builder() { @@ -4745,90 +4936,153 @@ public static Builder builder() { } public static class Builder { - private Boolean accessControlledVenue; + private Affiliate affiliate; - private Address address; + private Object bookingNumber; - private Affiliate affiliate; + private Object carrierName; - private Object company; + private Object customerServicePhoneNumber; - private Delivery delivery; + private Long daysRented; - private Long endsAt; + private Distance distance; + + private List drivers; + + private DropOff dropOff; private Map extraParams; - private Object genre; + private List insurances; - private Object name; + private Boolean noShowIndicator; - private Long startsAt; + private Pickup pickup; + + private Object renterName; + + private Total total; + + private Vehicle vehicle; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.EventDetails build() { - return new PaymentIntentUpdateParams.PaymentDetails.EventDetails( - this.accessControlledVenue, - this.address, + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData( this.affiliate, - this.company, - this.delivery, - this.endsAt, + this.bookingNumber, + this.carrierName, + this.customerServicePhoneNumber, + this.daysRented, + this.distance, + this.drivers, + this.dropOff, this.extraParams, - this.genre, - this.name, - this.startsAt); + this.insurances, + this.noShowIndicator, + this.pickup, + this.renterName, + this.total, + this.vehicle); } - /** Indicates if the tickets are digitally checked when entering the venue. */ - public Builder setAccessControlledVenue(Boolean accessControlledVenue) { - this.accessControlledVenue = accessControlledVenue; + /** Affiliate (such as travel agency) details for the rental. */ + public Builder setAffiliate( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Affiliate affiliate) { + this.affiliate = affiliate; return this; } - /** The event location's address. */ - public Builder setAddress( - PaymentIntentUpdateParams.PaymentDetails.EventDetails.Address address) { - this.address = address; + /** Booking confirmation number for the car rental. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentUpdateParams.PaymentDetails.EventDetails.Affiliate affiliate) { - this.affiliate = affiliate; + /** Booking confirmation number for the car rental. */ + public Builder setBookingNumber(EmptyParam bookingNumber) { + this.bookingNumber = bookingNumber; return this; } - /** The name of the company. */ - public Builder setCompany(String company) { - this.company = company; + /** Name of the car rental company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; return this; } - /** The name of the company. */ - public Builder setCompany(EmptyParam company) { - this.company = company; + /** Name of the car rental company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; return this; } - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery delivery) { - this.delivery = delivery; + /** Customer service phone number for the car rental company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; return this; } - /** Event end time. Measured in seconds since the Unix epoch. */ - public Builder setEndsAt(Long endsAt) { - this.endsAt = endsAt; + /** Customer service phone number for the car rental company. */ + public Builder setCustomerServicePhoneNumber(EmptyParam customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** Number of days the car is being rented. */ + public Builder setDaysRented(Long daysRented) { + this.daysRented = daysRented; + return this; + } + + /** Distance details for the rental. */ + public Builder setDistance( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Distance distance) { + this.distance = distance; + 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 + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData#drivers} for the field + * documentation. + */ + public Builder addDriver( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.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 + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData#drivers} for the field + * documentation. + */ + public Builder addAllDriver( + List elements) { + if (this.drivers == null) { + this.drivers = new ArrayList<>(); + } + this.drivers.addAll(elements); + return this; + } + + /** Required. Drop-off location details. */ + public Builder setDropOff( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff dropOff) { + this.dropOff = dropOff; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.EventDetails#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.CarRentalData#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4842,7 +5096,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.EventDetails#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.CarRentalData#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4853,50 +5107,82 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Type of the event entertainment (concert, sports event etc). */ - public Builder setGenre(String genre) { - this.genre = genre; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** Type of the event entertainment (concert, sports event etc). */ - public Builder setGenre(EmptyParam genre) { - this.genre = genre; + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); return this; } - /** Required. The name of the event. */ - public Builder setName(String name) { - this.name = name; + /** Indicates if the customer was a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; return this; } - /** Required. The name of the event. */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Required. Pickup location details. */ + public Builder setPickup( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup pickup) { + this.pickup = pickup; return this; } - /** Event start time. Measured in seconds since the Unix epoch. */ - public Builder setStartsAt(Long startsAt) { - this.startsAt = startsAt; + /** Name of the person renting the vehicle. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Name of the person renting the vehicle. */ + public Builder setRenterName(EmptyParam renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total cost breakdown for the rental. */ + public Builder setTotal( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total total) { + this.total = total; + return this; + } + + /** Vehicle details for the rental. */ + public Builder setVehicle( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Vehicle vehicle) { + this.vehicle = vehicle; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - Object city; - - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - Object country; + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + Object code; /** * Map of extra parameters for custom features not available in this client library. The @@ -4908,37 +5194,14 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - Object line1; - - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - Object line2; - - /** ZIP or postal code. */ - @SerializedName("postal_code") - Object postalCode; - - /** State, county, province, or region. */ - @SerializedName("state") - Object state; + /** Name of affiliate partner. */ + @SerializedName("name") + Object name; - private Address( - Object city, - Object country, - Map extraParams, - Object line1, - Object line2, - Object postalCode, - Object state) { - this.city = city; - this.country = country; + private Affiliate(Object code, Map extraParams, Object name) { + this.code = code; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.name = name; } public static Builder builder() { @@ -4946,59 +5209,27 @@ public static Builder builder() { } public static class Builder { - private Object city; - - private Object country; + private Object code; private Map extraParams; - private Object line1; - - private Object line2; - - private Object postalCode; - - private Object state; + private Object name; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Address build() { - return new PaymentIntentUpdateParams.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; - } - - /** City, district, suburb, town, or village. */ - public Builder setCity(EmptyParam city) { - this.city = city; - return this; + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Affiliate build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Affiliate( + this.code, this.extraParams, this.name); } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; return this; } - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(EmptyParam country) { - this.country = country; + /** Affiliate partner code. */ + public Builder setCode(EmptyParam code) { + this.code = code; return this; } @@ -5006,7 +5237,7 @@ public Builder setCountry(EmptyParam country) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Address#extraParams} for the + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Affiliate#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5021,7 +5252,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Address#extraParams} for the + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Affiliate#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5032,51 +5263,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } - - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(EmptyParam line1) { - this.line1 = line1; - return this; - } - - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } - - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(EmptyParam line2) { - this.line2 = line2; - return this; - } - - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } - - /** ZIP or postal code. */ - public Builder setPostalCode(EmptyParam postalCode) { - this.postalCode = postalCode; - return this; - } - - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; return this; } - /** State, county, province, or region. */ - public Builder setState(EmptyParam state) { - this.state = state; + /** Name of affiliate partner. */ + public Builder setName(EmptyParam name) { + this.name = name; return this; } } @@ -5084,7 +5279,11 @@ public Builder setState(EmptyParam state) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Distance { + /** Required. Distance traveled. */ + @SerializedName("amount") + Long amount; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5095,13 +5294,17 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - Object name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + @SerializedName("unit") + Unit unit; - private Affiliate(Map extraParams, Object name) { + private Distance(Long amount, Map extraParams, Unit unit) { + this.amount = amount; this.extraParams = extraParams; - this.name = name; + this.unit = unit; } public static Builder builder() { @@ -5109,21 +5312,29 @@ public static Builder builder() { } public static class Builder { + private Long amount; + private Map extraParams; - private Object name; + private Unit unit; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Affiliate build() { - return new PaymentIntentUpdateParams.PaymentDetails.EventDetails.Affiliate( - this.extraParams, this.name); + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Distance build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Distance( + this.amount, this.extraParams, this.unit); + } + + /** Required. Distance traveled. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Distance#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5138,7 +5349,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Distance#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5149,23 +5360,48 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Unit of measurement for the distance traveled. One of {@code + * miles} or {@code kilometers}. + */ + public Builder setUnit( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Distance.Unit unit) { + this.unit = unit; return this; } + } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; + public enum Unit implements ApiRequestParams.EnumParam { + @SerializedName("kilometers") + KILOMETERS("kilometers"), + + @SerializedName("miles") + MILES("miles"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Unit(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Driver { + /** Driver's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Driver's identification number. */ + @SerializedName("driver_identification_number") + Object driverIdentificationNumber; + + /** Driver's tax number. */ + @SerializedName("driver_tax_number") + Object driverTaxNumber; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5176,42 +5412,85 @@ public static class Delivery { @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; - } + /** Required. Driver's full name. */ + @SerializedName("name") + Object name; + + private Driver( + DateOfBirth dateOfBirth, + Object driverIdentificationNumber, + Object driverTaxNumber, + Map extraParams, + Object name) { + this.dateOfBirth = dateOfBirth; + this.driverIdentificationNumber = driverIdentificationNumber; + this.driverTaxNumber = driverTaxNumber; + this.extraParams = extraParams; + this.name = name; + } public static Builder builder() { return new Builder(); } public static class Builder { - private Map extraParams; + private DateOfBirth dateOfBirth; - private Mode mode; + private Object driverIdentificationNumber; - private Recipient recipient; + private Object driverTaxNumber; + + private Map extraParams; + + private Object name; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery build() { - return new PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery( - this.extraParams, this.mode, this.recipient); + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver( + this.dateOfBirth, + this.driverIdentificationNumber, + this.driverTaxNumber, + this.extraParams, + this.name); + } + + /** Driver's date of birth. */ + public Builder setDateOfBirth( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth + dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Driver's identification number. */ + public Builder setDriverIdentificationNumber(String driverIdentificationNumber) { + this.driverIdentificationNumber = driverIdentificationNumber; + return this; + } + + /** Driver's identification number. */ + public Builder setDriverIdentificationNumber(EmptyParam driverIdentificationNumber) { + this.driverIdentificationNumber = driverIdentificationNumber; + return this; + } + + /** Driver's tax number. */ + public Builder setDriverTaxNumber(String driverTaxNumber) { + this.driverTaxNumber = driverTaxNumber; + return this; + } + + /** Driver's tax number. */ + public Builder setDriverTaxNumber(EmptyParam driverTaxNumber) { + this.driverTaxNumber = driverTaxNumber; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5226,7 +5505,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery#extraParams} for the + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5237,27 +5516,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Mode mode) { - this.mode = mode; + /** Required. Driver's full name. */ + public Builder setName(String name) { + this.name = name; return this; } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Required. Driver's full name. */ + public Builder setName(EmptyParam name) { + this.name = name; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - Object email; + public static class DateOfBirth { + /** Required. Day of birth (1-31). */ + @SerializedName("day") + Long day; /** * Map of extra parameters for custom features not available in this client library. The @@ -5269,20 +5546,19 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - Object name; + /** Required. Month of birth (1-12). */ + @SerializedName("month") + Long month; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - Object phone; + /** Required. Year of birth (must be greater than 1900). */ + @SerializedName("year") + Long year; - private Recipient( - Object email, Map extraParams, Object name, Object phone) { - this.email = email; + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.month = month; + this.year = year; } public static Builder builder() { @@ -5290,30 +5566,24 @@ public static Builder builder() { } public static class Builder { - private Object email; + private Long day; private Map extraParams; - private Object name; + private Long month; - private Object phone; + private Long year; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth build() { - return new PaymentIntentUpdateParams.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; + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth( + this.day, this.extraParams, this.month, this.year); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(EmptyParam email) { - this.email = email; + /** Required. Day of birth (1-31). */ + public Builder setDay(Long day) { + this.day = day; return this; } @@ -5321,7 +5591,7 @@ public Builder setEmail(EmptyParam email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5336,7 +5606,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Driver.DateOfBirth#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5347,324 +5617,347 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; - return this; - } - - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(EmptyParam 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; + /** Required. Month of birth (1-12). */ + public Builder setMonth(Long month) { + this.month = month; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; + /** Required. Year of birth (must be greater than 1900). */ + public Builder setYear(Long year) { + this.year = year; return this; } } } + } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DropOff { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; - @SerializedName("phone") - PHONE("phone"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("pickup") - PICKUP("pickup"), + /** Location name. */ + @SerializedName("location_name") + Object locationName; - @SerializedName("post") - POST("post"); + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - @Getter(onMethod_ = {@Override}) - private final String value; + private DropOff( + Address address, Map extraParams, Object locationName, Long time) { + this.address = address; + this.extraParams = extraParams; + this.locationName = locationName; + this.time = time; + } - Mode(String value) { - this.value = value; - } + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Flight { - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + public static class Builder { + private Address address; - /** - * The agency number (i.e. International Air Transport Association (IATA) agency number) of - * the travel agency that made the booking. - */ - @SerializedName("agency_number") - Object agencyNumber; + private Map extraParams; - /** - * The International Air Transport Association (IATA) carrier code of the carrier that issued - * the ticket. - */ - @SerializedName("carrier") - Object carrier; + private Object locationName; - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + private Long time; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff( + this.address, this.extraParams, this.locationName, this.time); + } - /** The name of the person or entity on the reservation. */ - @SerializedName("passenger_name") - Object passengerName; + /** Required. Address of the rental location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff.Address address) { + this.address = address; + return this; + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Required. The individual flight segments associated with the trip. */ - @SerializedName("segments") - List segments; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff#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 ticket number associated with the travel reservation. */ - @SerializedName("ticket_number") - Object ticketNumber; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; + return this; + } - private Flight( - Affiliate affiliate, - Object agencyNumber, - Object carrier, - Delivery delivery, - Map extraParams, - Object passengerName, - List passengers, - List segments, - Object 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; - } + /** Location name. */ + public Builder setLocationName(EmptyParam locationName) { + this.locationName = locationName; + return this; + } - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Affiliate affiliate; + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; + return this; + } + } - private Object agencyNumber; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; - private Object carrier; + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; - private 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; - private Map extraParams; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + Object line1; - private Object passengerName; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; - private List passengers; + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; - private List segments; + /** State, county, province, or region. */ + @SerializedName("state") + Object state; - private Object ticketNumber; + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Flight build() { - return new PaymentIntentUpdateParams.PaymentDetails.Flight( - this.affiliate, - this.agencyNumber, - this.carrier, - this.delivery, - this.extraParams, - this.passengerName, - this.passengers, - this.segments, - this.ticketNumber); - } + public static Builder builder() { + return new Builder(); + } - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + public static class Builder { + private Object city; - /** - * 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; - } + private Object country; - /** - * The agency number (i.e. International Air Transport Association (IATA) agency number) of - * the travel agency that made the booking. - */ - public Builder setAgencyNumber(EmptyParam agencyNumber) { - this.agencyNumber = agencyNumber; - return this; - } + private Map extraParams; - /** - * 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; - } + private Object line1; - /** - * The International Air Transport Association (IATA) carrier code of the carrier that - * issued the ticket. - */ - public Builder setCarrier(EmptyParam carrier) { - this.carrier = carrier; - return this; - } + private Object line2; - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery delivery) { - this.delivery = delivery; - return this; - } + private Object postalCode; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; - } + private Object state; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff.Address build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - /** The name of the person or entity on the reservation. */ - public Builder setPassengerName(String passengerName) { - this.passengerName = passengerName; - return this; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** The name of the person or entity on the reservation. */ - public Builder setPassengerName(EmptyParam passengerName) { - this.passengerName = passengerName; - return this; - } + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + 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 - * PaymentIntentUpdateParams.PaymentDetails.Flight#passengers} for the field documentation. - */ - public Builder addPassenger( - PaymentIntentUpdateParams.PaymentDetails.Flight.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); - } - this.passengers.add(element); - return this; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + 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 - * PaymentIntentUpdateParams.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; - } + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + 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 - * PaymentIntentUpdateParams.PaymentDetails.Flight#segments} for the field documentation. - */ - public Builder addSegment(PaymentIntentUpdateParams.PaymentDetails.Flight.Segment element) { - if (this.segments == null) { - this.segments = new ArrayList<>(); - } - this.segments.add(element); - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff.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 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 - * PaymentIntentUpdateParams.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; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.DropOff.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; + } - /** The ticket number associated with the travel reservation. */ - public Builder setTicketNumber(String ticketNumber) { - this.ticketNumber = ticketNumber; - return this; - } + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } - /** The ticket number associated with the travel reservation. */ - public Builder setTicketNumber(EmptyParam ticketNumber) { - this.ticketNumber = ticketNumber; - return this; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + public static class Insurance { + /** Required. Amount of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the insurance amount. */ + @SerializedName("currency") + Object currency; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5675,13 +5968,25 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - Object name; + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; - private Affiliate(Map extraParams, Object name) { + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; this.extraParams = extraParams; - this.name = name; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; } public static Builder builder() { @@ -5689,21 +5994,50 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private Object currency; + private Map extraParams; - private Object name; + private Object insuranceCompanyName; + + private InsuranceType insuranceType; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate build() { - return new PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate( - this.extraParams, this.name); + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Insurance build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Amount of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Insurance#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5716,8 +6050,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Insurance#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5727,23 +6062,62 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; return this; } } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("liability_supplement") + LIABILITY_SUPPLEMENT("liability_supplement"), + + @SerializedName("loss_damage_waiver") + LOSS_DAMAGE_WAIVER("loss_damage_waiver"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_damage_waiver") + PARTIAL_DAMAGE_WAIVER("partial_damage_waiver"), + + @SerializedName("personal_accident") + PERSONAL_ACCIDENT("personal_accident"), + + @SerializedName("personal_effects") + PERSONAL_EFFECTS("personal_effects"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Delivery { + public static class Pickup { + /** Required. Address of the rental location. */ + @SerializedName("address") + Address address; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5754,18 +6128,20 @@ public static class Delivery { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + /** Location name. */ + @SerializedName("location_name") + Object locationName; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + /** Required. Timestamp for the location. */ + @SerializedName("time") + Long time; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { + private Pickup( + Address address, Map extraParams, Object locationName, Long time) { + this.address = address; this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; + this.locationName = locationName; + this.time = time; } public static Builder builder() { @@ -5773,23 +6149,33 @@ public static Builder builder() { } public static class Builder { + private Address address; + private Map extraParams; - private Mode mode; + private Object locationName; - private Recipient recipient; + private Long time; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery build() { - return new PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery( - this.extraParams, this.mode, this.recipient); + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup( + this.address, this.extraParams, this.locationName, this.time); + } + + /** Required. Address of the rental location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup.Address address) { + this.address = address; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5802,8 +6188,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5813,27 +6200,38 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Mode mode) { - this.mode = mode; + /** Location name. */ + public Builder setLocationName(String locationName) { + this.locationName = locationName; return this; } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { - this.recipient = recipient; + /** Location name. */ + public Builder setLocationName(EmptyParam locationName) { + this.locationName = locationName; + return this; + } + + /** Required. Timestamp for the location. */ + public Builder setTime(Long time) { + this.time = time; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @SerializedName("email") - Object email; + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; /** * Map of extra parameters for custom features not available in this client library. The @@ -5845,20 +6243,39 @@ public static class Recipient { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - Object name; + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + Object line1; - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - Object phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; - private Recipient( - Object email, Map extraParams, Object name, Object phone) { - this.email = email; + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; this.extraParams = extraParams; - this.name = name; - this.phone = phone; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; } public static Builder builder() { @@ -5866,29 +6283,59 @@ public static Builder builder() { } public static class Builder { - private Object email; + private Object city; + + private Object country; private Map extraParams; - private Object name; + private Object line1; - private Object phone; + private Object line2; + + private Object postalCode; + + private Object state; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient build() { - return new PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient( - this.email, this.extraParams, this.name, this.phone); + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup.Address build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(String email) { - this.email = email; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; return this; } - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(EmptyParam email) { - this.email = email; + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; return this; } @@ -5896,8 +6343,8 @@ public Builder setEmail(EmptyParam email) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5911,8 +6358,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for - * the field documentation. + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Pickup.Address#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5922,57 +6369,82 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(EmptyParam name) { - this.name = name; + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; return this; } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; return this; } - } - } - - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), - - @SerializedName("phone") - PHONE("phone"), - @SerializedName("pickup") - PICKUP("pickup"), + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("post") - POST("post"); + /** Required. ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } - Mode(String value) { - this.value = value; + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Passenger { + public static class Total { + /** Required. Total amount in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the amount. */ + @SerializedName("currency") + Object currency; + + /** Discount details for the rental. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the rental. */ + @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. @@ -5983,15 +6455,36 @@ public static class Passenger { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. Full name of the person or entity on the flight reservation. - */ - @SerializedName("name") - Object name; + /** Rate per unit for the rental. */ + @SerializedName("rate_per_unit") + Long ratePerUnit; - private Passenger(Map extraParams, Object name) { + /** Unit of measurement for the rate. */ + @SerializedName("rate_unit") + RateUnit rateUnit; + + /** Tax breakdown for the rental. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + Object currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Long ratePerUnit, + RateUnit rateUnit, + Tax tax) { + this.amount = amount; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; this.extraParams = extraParams; - this.name = name; + this.ratePerUnit = ratePerUnit; + this.rateUnit = rateUnit; + this.tax = tax; } public static Builder builder() { @@ -5999,21 +6492,98 @@ public static Builder builder() { } public static class Builder { + private Long amount; + + private Object currency; + + private Discounts discounts; + + private List + extraCharges; + private Map extraParams; - private Object name; + private Long ratePerUnit; + + private RateUnit rateUnit; + + private Tax tax; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Flight.Passenger build() { - return new PaymentIntentUpdateParams.PaymentDetails.Flight.Passenger( - this.extraParams, this.name); + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total( + this.amount, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.ratePerUnit, + this.rateUnit, + this.tax); + } + + /** Required. Total amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency of the amount. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Discount details for the rental. */ + public Builder setDiscounts( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total#extraCharges} for the + * field documentation. + */ + public Builder addExtraCharge( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.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 PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total#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 PaymentIntentUpdateParams.PaymentDetails.Flight.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6026,8 +6596,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Flight.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6037,1262 +6608,1062 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Full name of the person or entity on the flight reservation. - */ - public Builder setName(String name) { - this.name = name; + /** Rate per unit for the rental. */ + public Builder setRatePerUnit(Long ratePerUnit) { + this.ratePerUnit = ratePerUnit; return this; } - /** - * Required. Full name of the person or entity on the flight reservation. - */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Unit of measurement for the rate. */ + public Builder setRateUnit( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.RateUnit rateUnit) { + this.rateUnit = rateUnit; return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Segment { - /** The flight segment amount. */ - @SerializedName("amount") - Long amount; + /** Tax breakdown for the rental. */ + public Builder setTax( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax tax) { + this.tax = tax; + return this; + } + } - /** - * The International Air Transport Association (IATA) airport code for the arrival airport. - */ - @SerializedName("arrival_airport") - Object arrivalAirport; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + Object corporateClientCode; - /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ - @SerializedName("arrives_at") - Long arrivesAt; + /** Coupon code applied to the rental. */ + @SerializedName("coupon") + Object coupon; - /** - * The International Air Transport Association (IATA) carrier code of the carrier operating - * the flight segment. - */ - @SerializedName("carrier") - Object carrier; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Required. The departure time for the flight segment. Measured in seconds - * since the Unix epoch. - */ - @SerializedName("departs_at") - Long departsAt; + /** Maximum number of free miles or kilometers included. */ + @SerializedName("maximum_free_miles_or_kilometers") + Long maximumFreeMilesOrKilometers; - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - @SerializedName("departure_airport") - Object departureAirport; + private Discounts( + Object corporateClientCode, + Object coupon, + Map extraParams, + Long maximumFreeMilesOrKilometers) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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") - Object flightNumber; - - /** The fare class for the segment. */ - @SerializedName("service_class") - ServiceClass serviceClass; + public static Builder builder() { + return new Builder(); + } - private Segment( - Long amount, - Object arrivalAirport, - Long arrivesAt, - Object carrier, - Long departsAt, - Object departureAirport, - Map extraParams, - Object 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 class Builder { + private Object corporateClientCode; - public static Builder builder() { - return new Builder(); - } + private Object coupon; - public static class Builder { - private Long amount; + private Map extraParams; - private Object arrivalAirport; + private Long maximumFreeMilesOrKilometers; - private Long arrivesAt; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Discounts build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Discounts( + this.corporateClientCode, + this.coupon, + this.extraParams, + this.maximumFreeMilesOrKilometers); + } - private Object carrier; + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - private Long departsAt; + /** Corporate client discount code. */ + public Builder setCorporateClientCode(EmptyParam corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } - private Object departureAirport; + /** Coupon code applied to the rental. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } - private Map extraParams; + /** Coupon code applied to the rental. */ + public Builder setCoupon(EmptyParam coupon) { + this.coupon = coupon; + return this; + } - private Object flightNumber; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private ServiceClass serviceClass; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Discounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Flight.Segment build() { - return new PaymentIntentUpdateParams.PaymentDetails.Flight.Segment( - this.amount, - this.arrivalAirport, - this.arrivesAt, - this.carrier, - this.departsAt, - this.departureAirport, - this.extraParams, - this.flightNumber, - this.serviceClass); + /** Maximum number of free miles or kilometers included. */ + public Builder setMaximumFreeMilesOrKilometers(Long maximumFreeMilesOrKilometers) { + this.maximumFreeMilesOrKilometers = maximumFreeMilesOrKilometers; + return this; + } } + } - /** The flight segment amount. */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Required. Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; /** - * The International Air Transport Association (IATA) airport code for the arrival - * airport. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. */ - public Builder setArrivalAirport(String arrivalAirport) { - this.arrivalAirport = arrivalAirport; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * The International Air Transport Association (IATA) airport code for the arrival - * airport. - */ - public Builder setArrivalAirport(EmptyParam arrivalAirport) { - this.arrivalAirport = arrivalAirport; - return this; - } + /** Required. Type of extra charge. */ + @SerializedName("type") + Type type; - /** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */ - public Builder setArrivesAt(Long arrivesAt) { - this.arrivesAt = arrivesAt; - return this; + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; } - /** - * 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; + public static Builder builder() { + return new Builder(); } - /** - * The International Air Transport Association (IATA) carrier code of the carrier - * operating the flight segment. - */ - public Builder setCarrier(EmptyParam carrier) { - this.carrier = carrier; - return this; - } + public static class Builder { + private Long amount; - /** - * 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; - } + private Map extraParams; - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - public Builder setDepartureAirport(String departureAirport) { - this.departureAirport = departureAirport; - return this; - } + private Type type; - /** - * The International Air Transport Association (IATA) airport code for the departure - * airport. - */ - public Builder setDepartureAirport(EmptyParam departureAirport) { - this.departureAirport = departureAirport; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge + build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Flight.Segment#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Required. Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Flight.Segment#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; } - this.extraParams.putAll(map); - return this; - } - /** The flight number associated with the segment. */ - public Builder setFlightNumber(String flightNumber) { - this.flightNumber = flightNumber; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge#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. Type of extra charge. */ + public Builder setType( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.ExtraCharge.Type + type) { + this.type = type; + return this; + } } - /** The flight number associated with the segment. */ - public Builder setFlightNumber(EmptyParam flightNumber) { - this.flightNumber = flightNumber; - return this; - } - - /** The fare class for the segment. */ - public Builder setServiceClass( - PaymentIntentUpdateParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) { - this.serviceClass = serviceClass; - return this; - } - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("extra_mileage") + EXTRA_MILEAGE("extra_mileage"), - public enum ServiceClass implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), + @SerializedName("gas") + GAS("gas"), - @SerializedName("economy") - ECONOMY("economy"), + @SerializedName("gps") + GPS("gps"), - @SerializedName("first") - FIRST("first"), + @SerializedName("late_charge") + LATE_CHARGE("late_charge"), - @SerializedName("premium_economy") - PREMIUM_ECONOMY("premium_economy"); + @SerializedName("one_way_drop_off") + ONE_WAY_DROP_OFF("one_way_drop_off"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("other") + OTHER("other"), - ServiceClass(String value) { - this.value = value; - } - } - } - } + @SerializedName("parking") + PARKING("parking"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Lodging { - /** The lodging location's address. */ - @SerializedName("address") - Address address; + @SerializedName("phone") + PHONE("phone"), - /** The number of adults on the booking. */ - @SerializedName("adults") - Long adults; + @SerializedName("regular_mileage") + REGULAR_MILEAGE("regular_mileage"), - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + @SerializedName("towing") + TOWING("towing"); - /** The booking number associated with the lodging reservation. */ - @SerializedName("booking_number") - Object bookingNumber; + @Getter(onMethod_ = {@Override}) + private final String value; - /** The lodging category. */ - @SerializedName("category") - Category category; + Type(String value) { + this.value = value; + } + } + } - /** - * Required. Lodging check-in time. Measured in seconds since the Unix epoch. - */ - @SerializedName("checkin_at") - Long checkinAt; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - @SerializedName("checkout_at") - Long checkoutAt; + /** Indicates if the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; - /** The customer service phone number of the lodging company. */ - @SerializedName("customer_service_phone_number") - Object customerServicePhoneNumber; + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; - /** The daily lodging room rate. */ - @SerializedName("daily_room_rate_amount") - Long dailyRoomRateAmount; + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } - /** Delivery details for this purchase. */ - @SerializedName("delivery") - Delivery delivery; + public static Builder builder() { + return new Builder(); + } - /** List of additional charges being billed. */ - @SerializedName("extra_charges") - List extraCharges; + public static class Builder { + private Map extraParams; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Boolean taxExemptIndicator; - /** Indicates whether the lodging location is compliant with the Fire Safety Act. */ - @SerializedName("fire_safety_act_compliance") - Boolean fireSafetyActCompliance; + private List + taxes; - /** The name of the lodging location. */ - @SerializedName("name") - Object name; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } - /** - * Indicates if the customer did not keep their booking while failing to cancel the - * reservation. - */ - @SerializedName("no_show") - Boolean noShow; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.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; + } - /** The number of rooms on the booking. */ - @SerializedName("number_of_rooms") - Long numberOfRooms; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.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; + } - /** The details of the passengers in the travel reservation. */ - @SerializedName("passengers") - List passengers; + /** Indicates if the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } - /** The phone number of the lodging location. */ - @SerializedName("property_phone_number") - Object propertyPhoneNumber; + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } - /** The room class for this purchase. */ - @SerializedName("room_class") - Object roomClass; + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List + elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } - /** The number of room nights. */ - @SerializedName("room_nights") - Long roomNights; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; - /** The total tax amount associating with the room reservation. */ - @SerializedName("total_room_tax_amount") - Long totalRoomTaxAmount; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 total tax amount. */ - @SerializedName("total_tax_amount") - Long totalTaxAmount; + /** Tax rate applied. */ + @SerializedName("rate") + Long rate; - private Lodging( - Address address, - Long adults, - Affiliate affiliate, - Object bookingNumber, - Category category, - Long checkinAt, - Long checkoutAt, - Object customerServicePhoneNumber, - Long dailyRoomRateAmount, - Delivery delivery, - List extraCharges, - Map extraParams, - Boolean fireSafetyActCompliance, - Object name, - Boolean noShow, - Long numberOfRooms, - List passengers, - Object propertyPhoneNumber, - Object 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; - } + /** Type of tax applied. */ + @SerializedName("type") + Object type; - public static Builder builder() { - return new Builder(); - } + private Tax(Long amount, Map extraParams, Long rate, Object type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } - public static class Builder { - private Address address; + public static Builder builder() { + return new Builder(); + } - private Long adults; + public static class Builder { + private Long amount; - private Affiliate affiliate; + private Map extraParams; - private Object bookingNumber; + private Long rate; - private Category category; + private Object type; - private Long checkinAt; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } - private Long checkoutAt; + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - private Object customerServicePhoneNumber; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.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; + } - private Long dailyRoomRateAmount; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.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; + } - private Delivery delivery; + /** Tax rate applied. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } - private List extraCharges; + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } - private Map extraParams; + /** Type of tax applied. */ + public Builder setType(EmptyParam type) { + this.type = type; + return this; + } + } + } + } - private Boolean fireSafetyActCompliance; + public enum RateUnit implements ApiRequestParams.EnumParam { + @SerializedName("days") + DAYS("days"), - private Object name; + @SerializedName("kilometers") + KILOMETERS("kilometers"), - private Boolean noShow; + @SerializedName("miles") + MILES("miles"), - private Long numberOfRooms; + @SerializedName("months") + MONTHS("months"), - private List passengers; + @SerializedName("weeks") + WEEKS("weeks"); - private Object propertyPhoneNumber; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object roomClass; + RateUnit(String value) { + this.value = value; + } + } + } - private Long roomNights; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vehicle { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Long totalRoomTaxAmount; + /** Make of the rental vehicle. */ + @SerializedName("make") + Object make; - private Long totalTaxAmount; + /** Model of the rental vehicle. */ + @SerializedName("model") + Object model; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Lodging build() { - return new PaymentIntentUpdateParams.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); - } + /** Odometer reading at the time of rental. */ + @SerializedName("odometer") + Long odometer; - /** The lodging location's address. */ - public Builder setAddress( - PaymentIntentUpdateParams.PaymentDetails.Lodging.Address address) { - this.address = address; - return this; - } + /** Type of the rental vehicle. */ + @SerializedName("type") + Type type; - /** The number of adults on the booking. */ - public Builder setAdults(Long adults) { - this.adults = adults; - return this; - } + /** Class of the rental vehicle. */ + @SerializedName("vehicle_class") + VehicleClass vehicleClass; - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentUpdateParams.PaymentDetails.Lodging.Affiliate affiliate) { - this.affiliate = affiliate; - return this; - } + /** Vehicle identification number (VIN). */ + @SerializedName("vehicle_identification_number") + Object vehicleIdentificationNumber; - /** The booking number associated with the lodging reservation. */ - public Builder setBookingNumber(String bookingNumber) { - this.bookingNumber = bookingNumber; - return this; + private Vehicle( + Map extraParams, + Object make, + Object model, + Long odometer, + Type type, + VehicleClass vehicleClass, + Object vehicleIdentificationNumber) { + this.extraParams = extraParams; + this.make = make; + this.model = model; + this.odometer = odometer; + this.type = type; + this.vehicleClass = vehicleClass; + this.vehicleIdentificationNumber = vehicleIdentificationNumber; } - /** The booking number associated with the lodging reservation. */ - public Builder setBookingNumber(EmptyParam bookingNumber) { - this.bookingNumber = bookingNumber; - return this; + public static Builder builder() { + return new Builder(); } - /** The lodging category. */ - public Builder setCategory( - PaymentIntentUpdateParams.PaymentDetails.Lodging.Category category) { - this.category = category; - return this; - } + public static class Builder { + private Map extraParams; - /** - * Required. Lodging check-in time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckinAt(Long checkinAt) { - this.checkinAt = checkinAt; - return this; - } + private Object make; - /** - * Required. Lodging check-out time. Measured in seconds since the Unix - * epoch. - */ - public Builder setCheckoutAt(Long checkoutAt) { - this.checkoutAt = checkoutAt; - return this; - } + private Object model; - /** The customer service phone number of the lodging company. */ - public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { - this.customerServicePhoneNumber = customerServicePhoneNumber; - return this; - } + private Long odometer; - /** The customer service phone number of the lodging company. */ - public Builder setCustomerServicePhoneNumber(EmptyParam customerServicePhoneNumber) { - this.customerServicePhoneNumber = customerServicePhoneNumber; - return this; - } + private Type type; - /** The daily lodging room rate. */ - public Builder setDailyRoomRateAmount(Long dailyRoomRateAmount) { - this.dailyRoomRateAmount = dailyRoomRateAmount; - return this; - } + private VehicleClass vehicleClass; - /** Delivery details for this purchase. */ - public Builder setDelivery( - PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery delivery) { - this.delivery = delivery; - return this; - } + private Object vehicleIdentificationNumber; - /** - * 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 - * PaymentIntentUpdateParams.PaymentDetails.Lodging#extraCharges} for the field - * documentation. - */ - public Builder addExtraCharge( - PaymentIntentUpdateParams.PaymentDetails.Lodging.ExtraCharge element) { - if (this.extraCharges == null) { - this.extraCharges = new ArrayList<>(); + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Vehicle build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Vehicle( + this.extraParams, + this.make, + this.model, + this.odometer, + this.type, + this.vehicleClass, + this.vehicleIdentificationNumber); } - 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 - * PaymentIntentUpdateParams.PaymentDetails.Lodging#extraCharges} for the field - * documentation. - */ - public Builder addAllExtraCharge( - List elements) { - if (this.extraCharges == null) { - this.extraCharges = new ArrayList<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Vehicle#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; } - 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 PaymentIntentUpdateParams.PaymentDetails.Lodging#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Vehicle#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Lodging#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Make of the rental vehicle. */ + public Builder setMake(String make) { + this.make = make; + return this; } - 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; - } + /** Make of the rental vehicle. */ + public Builder setMake(EmptyParam make) { + this.make = make; + return this; + } - /** The name of the lodging location. */ - public Builder setName(String name) { - this.name = name; - return this; - } + /** Model of the rental vehicle. */ + public Builder setModel(String model) { + this.model = model; + return this; + } - /** The name of the lodging location. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + /** Model of the rental vehicle. */ + public Builder setModel(EmptyParam model) { + this.model = model; + 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; - } + /** Odometer reading at the time of rental. */ + public Builder setOdometer(Long odometer) { + this.odometer = odometer; + return this; + } - /** The number of rooms on the booking. */ - public Builder setNumberOfRooms(Long numberOfRooms) { - this.numberOfRooms = numberOfRooms; - return this; - } + /** Type of the rental vehicle. */ + public Builder setType( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Vehicle.Type type) { + this.type = type; + 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 - * PaymentIntentUpdateParams.PaymentDetails.Lodging#passengers} for the field documentation. - */ - public Builder addPassenger( - PaymentIntentUpdateParams.PaymentDetails.Lodging.Passenger element) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); + /** Class of the rental vehicle. */ + public Builder setVehicleClass( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Vehicle.VehicleClass + vehicleClass) { + this.vehicleClass = vehicleClass; + return this; } - 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 - * PaymentIntentUpdateParams.PaymentDetails.Lodging#passengers} for the field documentation. - */ - public Builder addAllPassenger( - List elements) { - if (this.passengers == null) { - this.passengers = new ArrayList<>(); + /** Vehicle identification number (VIN). */ + public Builder setVehicleIdentificationNumber(String vehicleIdentificationNumber) { + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + return this; } - this.passengers.addAll(elements); - return this; - } - /** The phone number of the lodging location. */ - public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { - this.propertyPhoneNumber = propertyPhoneNumber; - return this; + /** Vehicle identification number (VIN). */ + public Builder setVehicleIdentificationNumber(EmptyParam vehicleIdentificationNumber) { + this.vehicleIdentificationNumber = vehicleIdentificationNumber; + return this; + } } - /** The phone number of the lodging location. */ - public Builder setPropertyPhoneNumber(EmptyParam propertyPhoneNumber) { - this.propertyPhoneNumber = propertyPhoneNumber; - return this; - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("cargo_van") + CARGO_VAN("cargo_van"), - /** The room class for this purchase. */ - public Builder setRoomClass(String roomClass) { - this.roomClass = roomClass; - return this; - } + @SerializedName("compact") + COMPACT("compact"), - /** The room class for this purchase. */ - public Builder setRoomClass(EmptyParam roomClass) { - this.roomClass = roomClass; - return this; - } + @SerializedName("economy") + ECONOMY("economy"), - /** The number of room nights. */ - public Builder setRoomNights(Long roomNights) { - this.roomNights = roomNights; - return this; - } + @SerializedName("exotic") + EXOTIC("exotic"), - /** The total tax amount associating with the room reservation. */ - public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) { - this.totalRoomTaxAmount = totalRoomTaxAmount; - return this; - } + @SerializedName("exotic_suv") + EXOTIC_SUV("exotic_suv"), - /** The total tax amount. */ - public Builder setTotalTaxAmount(Long totalTaxAmount) { - this.totalTaxAmount = totalTaxAmount; - return this; - } - } + @SerializedName("fifteen_passenger_van") + FIFTEEN_PASSENGER_VAN("fifteen_passenger_van"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - Object city; + @SerializedName("four_wheel_drive") + FOUR_WHEEL_DRIVE("four_wheel_drive"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - Object country; + @SerializedName("full_size") + FULL_SIZE("full_size"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("intermediate") + INTERMEDIATE("intermediate"), - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - Object line1; + @SerializedName("large_suv") + LARGE_SUV("large_suv"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - Object line2; + @SerializedName("large_truck") + LARGE_TRUCK("large_truck"), - /** ZIP or postal code. */ - @SerializedName("postal_code") - Object postalCode; + @SerializedName("luxury") + LUXURY("luxury"), - /** State, county, province, or region. */ - @SerializedName("state") - Object state; + @SerializedName("medium_suv") + MEDIUM_SUV("medium_suv"), - private Address( - Object city, - Object country, - Map extraParams, - Object line1, - Object line2, - Object postalCode, - Object state) { - this.city = city; - this.country = country; - this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; - } + @SerializedName("midsize") + MIDSIZE("midsize"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("mini") + MINI("mini"), - public static class Builder { - private Object city; + @SerializedName("minivan") + MINIVAN("minivan"), - private Object country; + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), - private Map extraParams; + @SerializedName("moped") + MOPED("moped"), - private Object line1; + @SerializedName("moving_van") + MOVING_VAN("moving_van"), - private Object line2; + @SerializedName("premium") + PREMIUM("premium"), - private Object postalCode; + @SerializedName("regular") + REGULAR("regular"), - private Object state; + @SerializedName("small_medium_truck") + SMALL_MEDIUM_TRUCK("small_medium_truck"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Lodging.Address build() { - return new PaymentIntentUpdateParams.PaymentDetails.Lodging.Address( - this.city, - this.country, - this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); - } + @SerializedName("small_suv") + SMALL_SUV("small_suv"), - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; - return this; - } + @SerializedName("special") + SPECIAL("special"), - /** City, district, suburb, town, or village. */ - public Builder setCity(EmptyParam city) { - this.city = city; - return this; - } + @SerializedName("standard") + STANDARD("standard"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; - return this; - } + @SerializedName("stretch") + STRETCH("stretch"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(EmptyParam country) { - this.country = country; - return this; - } + @SerializedName("subcompact") + SUBCOMPACT("subcompact"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; - } + @SerializedName("taxi") + TAXI("taxi"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; - } + @SerializedName("twelve_foot_truck") + TWELVE_FOOT_TRUCK("twelve_foot_truck"), - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } + @SerializedName("twelve_passenger_van") + TWELVE_PASSENGER_VAN("twelve_passenger_van"), - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(EmptyParam line1) { - this.line1 = line1; - return this; - } + @SerializedName("twenty_foot_truck") + TWENTY_FOOT_TRUCK("twenty_foot_truck"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } + @SerializedName("twenty_four_foot_truck") + TWENTY_FOUR_FOOT_TRUCK("twenty_four_foot_truck"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(EmptyParam line2) { - this.line2 = line2; - return this; - } + @SerializedName("twenty_six_foot_truck") + TWENTY_SIX_FOOT_TRUCK("twenty_six_foot_truck"), - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + @SerializedName("unique") + UNIQUE("unique"); - /** ZIP or postal code. */ - public Builder setPostalCode(EmptyParam postalCode) { - this.postalCode = postalCode; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; + Type(String value) { + this.value = value; } + } - /** State, county, province, or region. */ - public Builder setState(EmptyParam state) { - this.state = state; - return this; + public enum VehicleClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + VehicleClass(String value) { + this.value = value; } } } + } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EventDetails { + /** Indicates if the tickets are digitally checked when entering the venue. */ + @SerializedName("access_controlled_venue") + Boolean accessControlledVenue; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - Object name; + /** The event location's address. */ + @SerializedName("address") + Address address; - private Affiliate(Map extraParams, Object name) { - this.extraParams = extraParams; - this.name = name; - } + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - public static Builder builder() { - return new Builder(); - } + /** The name of the company. */ + @SerializedName("company") + Object company; - public static class Builder { - private Map extraParams; + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - private Object name; + /** Event end time. Measured in seconds since the Unix epoch. */ + @SerializedName("ends_at") + Long endsAt; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Lodging.Affiliate build() { - return new PaymentIntentUpdateParams.PaymentDetails.Lodging.Affiliate( - this.extraParams, this.name); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; - } + /** Type of the event entertainment (concert, sports event etc). */ + @SerializedName("genre") + Object genre; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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 event. */ + @SerializedName("name") + Object name; - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; - return this; - } + /** Event start time. Measured in seconds since the Unix epoch. */ + @SerializedName("starts_at") + Long startsAt; - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } - } + private EventDetails( + Boolean accessControlledVenue, + Address address, + Affiliate affiliate, + Object company, + Delivery delivery, + Long endsAt, + Map extraParams, + Object genre, + Object 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; } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public static Builder builder() { + return new Builder(); + } - /** The delivery method for the payment. */ - @SerializedName("mode") - Mode mode; + public static class Builder { + private Boolean accessControlledVenue; - /** Details of the recipient. */ - @SerializedName("recipient") - Recipient recipient; + private Address address; - private Delivery(Map extraParams, Mode mode, Recipient recipient) { - this.extraParams = extraParams; - this.mode = mode; - this.recipient = recipient; - } + private Affiliate affiliate; - public static Builder builder() { - return new Builder(); - } + private Object company; - public static class Builder { - private Map extraParams; + private Delivery delivery; - private Mode mode; + private Long endsAt; - private Recipient recipient; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery build() { - return new PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery( - this.extraParams, this.mode, this.recipient); - } + private Object genre; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; - } + private Object name; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; - } + private Long startsAt; - /** The delivery method for the payment. */ - public Builder setMode( - PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Mode mode) { - this.mode = mode; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.EventDetails build() { + return new PaymentIntentUpdateParams.PaymentDetails.EventDetails( + this.accessControlledVenue, + this.address, + this.affiliate, + this.company, + this.delivery, + this.endsAt, + this.extraParams, + this.genre, + this.name, + this.startsAt); + } - /** Details of the recipient. */ - public Builder setRecipient( - PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { - this.recipient = recipient; - return this; - } + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; + return this; } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Recipient { - /** The email of the recipient the ticket is delivered to. */ - @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; - - /** The name of the recipient the ticket is delivered to. */ - @SerializedName("name") - Object name; - - /** The phone number of the recipient the ticket is delivered to. */ - @SerializedName("phone") - Object phone; - - private Recipient( - Object email, Map extraParams, Object name, Object 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 Object email; - - private Map extraParams; - - private Object name; - - private Object phone; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient build() { - return new PaymentIntentUpdateParams.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; - } - - /** The email of the recipient the ticket is delivered to. */ - public Builder setEmail(EmptyParam email) { - this.email = email; - return this; - } + /** The event location's address. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentDetails.EventDetails.Address address) { + this.address = address; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentUpdateParams.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; - } + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentUpdateParams.PaymentDetails.EventDetails.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentUpdateParams.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 company. */ + public Builder setCompany(String company) { + this.company = company; + return this; + } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(String name) { - this.name = name; - return this; - } + /** The name of the company. */ + public Builder setCompany(EmptyParam company) { + this.company = company; + return this; + } - /** The name of the recipient the ticket is delivered to. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery delivery) { + this.delivery = delivery; + return this; + } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } + /** Event end time. Measured in seconds since the Unix epoch. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } - /** The phone number of the recipient the ticket is delivered to. */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.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; } - public enum Mode implements ApiRequestParams.EnumParam { - @SerializedName("email") - EMAIL("email"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.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; + } - @SerializedName("phone") - PHONE("phone"), + /** Type of the event entertainment (concert, sports event etc). */ + public Builder setGenre(String genre) { + this.genre = genre; + return this; + } - @SerializedName("pickup") - PICKUP("pickup"), + /** Type of the event entertainment (concert, sports event etc). */ + public Builder setGenre(EmptyParam genre) { + this.genre = genre; + return this; + } - @SerializedName("post") - POST("post"); + /** Required. The name of the event. */ + public Builder setName(String name) { + this.name = name; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Required. The name of the event. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } - Mode(String value) { - this.value = value; - } + /** Event start time. Measured in seconds since the Unix epoch. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Passenger { + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7303,37 +7674,106 @@ public static class Passenger { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Required. Full name of the person or entity on the lodging reservation. - */ - @SerializedName("name") - Object name; - - private Passenger(Map extraParams, Object name) { - this.extraParams = extraParams; - this.name = name; - } + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; - public static Builder builder() { - return new Builder(); - } + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; - public static class Builder { - private Map extraParams; + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; - private Object name; + /** State, county, province, or region. */ + @SerializedName("state") + Object state; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Lodging.Passenger build() { - return new PaymentIntentUpdateParams.PaymentDetails.Lodging.Passenger( - this.extraParams, this.name); + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Address build() { + return new PaymentIntentUpdateParams.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; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Lodging.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Address#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -7346,8 +7786,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentDetails.Lodging.Passenger#extraParams} - * for the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Address#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -7357,238 +7798,140 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Required. Full name of the person or entity on the lodging - * reservation. - */ - public Builder setName(String name) { - this.name = name; + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; return this; } - /** - * Required. Full name of the person or entity on the lodging - * reservation. - */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; return this; } - } - } - public enum Category implements ApiRequestParams.EnumParam { - @SerializedName("hotel") - HOTEL("hotel"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - @SerializedName("vacation_rental") - VACATION_RENTAL("vacation_rental"); + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - Category(String value) { - this.value = value; + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } } } - public enum ExtraCharge implements ApiRequestParams.EnumParam { - @SerializedName("gift_shop") - GIFT_SHOP("gift_shop"), - - @SerializedName("laundry") - LAUNDRY("laundry"), + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - @SerializedName("mini_bar") - MINI_BAR("mini_bar"), + /** Required. The name of the affiliate that originated the purchase. */ + @SerializedName("name") + Object name; - @SerializedName("other") - OTHER("other"), + private Affiliate(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } - @SerializedName("restaurant") - RESTAURANT("restaurant"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("telephone") - TELEPHONE("telephone"); + public static class Builder { + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object name; - ExtraCharge(String value) { - this.value = value; - } - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Affiliate build() { + return new PaymentIntentUpdateParams.PaymentDetails.EventDetails.Affiliate( + this.extraParams, this.name); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Subscription { - /** Affiliate details for this purchase. */ - @SerializedName("affiliate") - Affiliate affiliate; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.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; + } - /** Info whether the subscription will be auto renewed upon expiry. */ - @SerializedName("auto_renewal") - Boolean autoRenewal; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.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; + } - /** Subscription billing details for this purchase. */ - @SerializedName("billing_interval") - BillingInterval billingInterval; + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + return this; + } - /** 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") - Object 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, - Object 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 Object name; - - private Long startsAt; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Subscription build() { - return new PaymentIntentUpdateParams.PaymentDetails.Subscription( - this.affiliate, - this.autoRenewal, - this.billingInterval, - this.endsAt, - this.extraParams, - this.name, - this.startsAt); - } - - /** Affiliate details for this purchase. */ - public Builder setAffiliate( - PaymentIntentUpdateParams.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( - PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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; - } - - /** - * Required. Name of the product on subscription. e.g. Apple Music - * Subscription - */ - public Builder setName(EmptyParam 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; - } - } + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } @Getter @EqualsAndHashCode(callSuper = false) - public static class Affiliate { + 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. @@ -7599,13 +7942,18 @@ public static class Affiliate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The name of the affiliate that originated the purchase. */ - @SerializedName("name") - Object name; + /** The delivery method for the payment. */ + @SerializedName("mode") + Mode mode; - private Affiliate(Map extraParams, Object name) { + /** Details of the recipient. */ + @SerializedName("recipient") + Recipient recipient; + + private Delivery(Map extraParams, Mode mode, Recipient recipient) { this.extraParams = extraParams; - this.name = name; + this.mode = mode; + this.recipient = recipient; } public static Builder builder() { @@ -7615,19 +7963,21 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private Object name; + private Mode mode; + + private Recipient recipient; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Subscription.Affiliate build() { - return new PaymentIntentUpdateParams.PaymentDetails.Subscription.Affiliate( - this.extraParams, this.name); + public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery build() { + return new PaymentIntentUpdateParams.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 - * PaymentIntentUpdateParams.PaymentDetails.Subscription.Affiliate#extraParams} for the + * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -7642,7 +7992,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.Subscription.Affiliate#extraParams} for the + * PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -7653,1543 +8003,12039 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(String name) { - this.name = name; + /** The delivery method for the payment. */ + public Builder setMode( + PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Mode mode) { + this.mode = mode; return this; } - /** Required. The name of the affiliate that originated the purchase. */ - public Builder setName(EmptyParam name) { - this.name = name; + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) { + this.recipient = recipient; return this; } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @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; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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; + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + Object name; - private BillingInterval(Long count, Map extraParams, Interval interval) { - this.count = count; - this.extraParams = extraParams; - this.interval = interval; - } + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + Object phone; - public static Builder builder() { - return new Builder(); - } + private Recipient( + Object email, Map extraParams, Object name, Object phone) { + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } - public static class Builder { - private Long count; + public static Builder builder() { + return new Builder(); + } - private Map extraParams; + public static class Builder { + private Object email; - private Interval interval; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.Subscription.BillingInterval build() { - return new PaymentIntentUpdateParams.PaymentDetails.Subscription.BillingInterval( - this.count, this.extraParams, this.interval); - } + private Object name; - /** - * 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; - } + private Object phone; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.Subscription.BillingInterval#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient + build() { + return new PaymentIntentUpdateParams.PaymentDetails.EventDetails.Delivery.Recipient( + this.email, this.extraParams, this.name, this.phone); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.Subscription.BillingInterval#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(String email) { + this.email = email; + return this; } - 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( - PaymentIntentUpdateParams.PaymentDetails.Subscription.BillingInterval.Interval - interval) { - this.interval = interval; - return this; + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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 name of the recipient the ticket is delivered to. */ + public Builder setName(EmptyParam 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; + } + + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } } } - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("email") + EMAIL("email"), - @SerializedName("month") - MONTH("month"), + @SerializedName("phone") + PHONE("phone"), - @SerializedName("week") - WEEK("week"), + @SerializedName("pickup") + PICKUP("pickup"), - @SerializedName("year") - YEAR("year"); + @SerializedName("post") + POST("post"); @Getter(onMethod_ = {@Override}) private final String value; - Interval(String value) { + Mode(String value) { this.value = value; } } } } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flight { + /** Affiliate details for this purchase. */ + @SerializedName("affiliate") + Affiliate affiliate; - /** - * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay - * payment method. - */ - @SerializedName("alipay") - Alipay alipay; + /** + * The agency number (i.e. International Air Transport Association (IATA) agency number) of + * the travel agency that made the booking. + */ + @SerializedName("agency_number") + Object agencyNumber; - /** - * 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; + /** + * The International Air Transport Association (IATA) carrier code of the carrier that issued + * the ticket. + */ + @SerializedName("carrier") + Object carrier; - /** - * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - */ - @SerializedName("alma") - Alma alma; + /** Delivery details for this purchase. */ + @SerializedName("delivery") + Delivery delivery; - /** - * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment - * method. - */ - @SerializedName("amazon_pay") - AmazonPay 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; - /** - * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank - * account. - */ - @SerializedName("au_becs_debit") - AuBecsDebit auBecsDebit; + /** The name of the person or entity on the reservation. */ + @SerializedName("passenger_name") + Object passengerName; - /** - * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs - * Direct Debit bank account. - */ - @SerializedName("bacs_debit") - BacsDebit bacsDebit; + /** The details of the passengers in the travel reservation. */ + @SerializedName("passengers") + List passengers; - /** - * If this is a {@code bancontact} PaymentMethod, this hash contains details about the - * Bancontact payment method. - */ - @SerializedName("bancontact") - Bancontact bancontact; + /** Required. The individual flight segments associated with the trip. */ + @SerializedName("segments") + List segments; - /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * payment method. - */ - @SerializedName("billie") - Billie billie; + /** The ticket number associated with the travel reservation. */ + @SerializedName("ticket_number") + Object ticketNumber; - /** - * Billing information associated with the PaymentMethod that may be used or required by - * particular types of payment methods. - */ - @SerializedName("billing_details") - BillingDetails billingDetails; + private Flight( + Affiliate affiliate, + Object agencyNumber, + Object carrier, + Delivery delivery, + Map extraParams, + Object passengerName, + List passengers, + List segments, + Object 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; + } - /** - * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment - * method. - */ - @SerializedName("blik") - Blik blik; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto - * payment method. - */ - @SerializedName("boleto") - Boleto boleto; + public static class Builder { + private Affiliate affiliate; - /** - * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay - * payment method. - */ - @SerializedName("cashapp") - Cashapp cashapp; + private Object agencyNumber; - /** - * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment - * method. - */ - @SerializedName("crypto") - Crypto crypto; + private Object carrier; - /** - * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the - * CustomerBalance payment method. - */ - @SerializedName("customer_balance") - CustomerBalance customerBalance; + private Delivery delivery; - /** - * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment - * method. - */ - @SerializedName("eps") - Eps eps; + private Map extraParams; - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Object passengerName; - /** - * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment - * method. - */ - @SerializedName("fpx") - Fpx fpx; + private List passengers; - /** - * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay - * payment method. - */ - @SerializedName("giropay") - Giropay giropay; + private List segments; - /** - * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - */ - @SerializedName("gopay") - Gopay gopay; + private Object ticketNumber; - /** - * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay - * payment method. - */ - @SerializedName("grabpay") - Grabpay grabpay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Flight build() { + return new PaymentIntentUpdateParams.PaymentDetails.Flight( + this.affiliate, + this.agencyNumber, + this.carrier, + this.delivery, + this.extraParams, + this.passengerName, + this.passengers, + this.segments, + this.ticketNumber); + } - /** - * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the - * IdBankTransfer payment method. - */ - @SerializedName("id_bank_transfer") - IdBankTransfer idBankTransfer; + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } - /** - * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment - * method. - */ - @SerializedName("ideal") - Ideal ideal; + /** + * 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; + } - /** - * If this is an {@code interac_present} PaymentMethod, this hash contains details about the - * Interac Present payment method. - */ - @SerializedName("interac_present") - InteracPresent interacPresent; + /** + * The agency number (i.e. International Air Transport Association (IATA) agency number) of + * the travel agency that made the booking. + */ + public Builder setAgencyNumber(EmptyParam agencyNumber) { + this.agencyNumber = agencyNumber; + return this; + } - /** - * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao Pay - * payment method. - */ - @SerializedName("kakao_pay") - KakaoPay kakaoPay; + /** + * 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; + } - /** - * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna - * payment method. - */ - @SerializedName("klarna") - Klarna klarna; + /** + * The International Air Transport Association (IATA) carrier code of the carrier that + * issued the ticket. + */ + public Builder setCarrier(EmptyParam carrier) { + this.carrier = carrier; + return this; + } - /** - * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini - * payment method. - */ - @SerializedName("konbini") - Konbini konbini; + /** Delivery details for this purchase. */ + public Builder setDelivery( + PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery delivery) { + this.delivery = delivery; + return this; + } - /** - * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean Card - * payment method. - */ - @SerializedName("kr_card") - KrCard krCard; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.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; + } - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - @SerializedName("link") - Link link; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.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; + } - /** - * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment - * method. - */ - @SerializedName("mb_way") - MbWay mbWay; + /** The name of the person or entity on the reservation. */ + public Builder setPassengerName(String passengerName) { + this.passengerName = passengerName; + return this; + } - /** - * Set of key-value pairs that you can attach - * to an object. This can be useful for storing additional information about the object in a - * structured format. Individual keys can be unset by posting an empty value to them. All keys - * can be unset by posting an empty value to {@code metadata}. - */ - @SerializedName("metadata") - Map metadata; + /** The name of the person or entity on the reservation. */ + public Builder setPassengerName(EmptyParam passengerName) { + this.passengerName = passengerName; + return this; + } - /** - * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the MobilePay - * payment method. - */ - @SerializedName("mobilepay") - Mobilepay mobilepay; + /** + * 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 + * PaymentIntentUpdateParams.PaymentDetails.Flight#passengers} for the field documentation. + */ + public Builder addPassenger( + PaymentIntentUpdateParams.PaymentDetails.Flight.Passenger element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - /** - * If this is a {@code multibanco} PaymentMethod, this hash contains details about the - * Multibanco payment method. - */ - @SerializedName("multibanco") - Multibanco multibanco; + /** + * 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 + * PaymentIntentUpdateParams.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; + } - /** - * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver Pay - * payment method. - */ - @SerializedName("naver_pay") - NaverPay naverPay; + /** + * 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 + * PaymentIntentUpdateParams.PaymentDetails.Flight#segments} for the field documentation. + */ + public Builder addSegment(PaymentIntentUpdateParams.PaymentDetails.Flight.Segment element) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.add(element); + return this; + } - /** - * If this is an nz_bank_account PaymentMethod, this hash contains details about the - * nz_bank_account payment method. - */ - @SerializedName("nz_bank_account") - NzBankAccount nzBankAccount; + /** + * 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 + * PaymentIntentUpdateParams.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; + } - /** - * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment - * method. - */ - @SerializedName("oxxo") - Oxxo oxxo; + /** The ticket number associated with the travel reservation. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } - /** - * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment - * method. - */ - @SerializedName("p24") - P24 p24; + /** The ticket number associated with the travel reservation. */ + public Builder setTicketNumber(EmptyParam ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. - */ - @SerializedName("pay_by_bank") - PayByBank payByBank; + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment - * method. - */ - @SerializedName("payco") - Payco payco; + /** Required. The name of the affiliate that originated the purchase. */ + @SerializedName("name") + Object name; - /** - * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow - * payment method. - */ - @SerializedName("paynow") - Paynow paynow; + private Affiliate(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } - /** - * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal - * payment method. - */ - @SerializedName("paypal") - Paypal paypal; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay - * payment method. - */ - @SerializedName("paypay") - Paypay paypay; + public static class Builder { + private Map extraParams; - /** - * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment - * method. - */ - @SerializedName("payto") - Payto payto; + private Object name; - /** - * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment - * method. - */ - @SerializedName("pix") - Pix pix; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate build() { + return new PaymentIntentUpdateParams.PaymentDetails.Flight.Affiliate( + this.extraParams, this.name); + } - /** - * If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay - * payment method. - */ - @SerializedName("promptpay") - Promptpay promptpay; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.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; + } - /** - * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment - * method. - */ - @SerializedName("qris") - Qris qris; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.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; + } - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - @SerializedName("radar_options") - RadarOptions radarOptions; + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(String name) { + this.name = name; + return this; + } - /** - * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung - * payment method. - */ - @SerializedName("rechnung") - Rechnung rechnung; + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } - /** - * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the Revolut - * Pay payment method. - */ - @SerializedName("revolut_pay") - RevolutPay revolutPay; + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @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; + + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + Object name; + + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + Object phone; + + private Recipient( + Object email, Map extraParams, Object name, Object 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 Object email; + + private Map extraParams; + + private Object name; + + private Object phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Flight.Delivery.Recipient build() { + return new PaymentIntentUpdateParams.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; + } + + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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 name of the recipient the ticket is delivered to. */ + public Builder setName(EmptyParam 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; + } + + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + 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") + Object name; + + private Passenger(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Flight.Passenger build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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; + } + + /** + * Required. Full name of the person or entity on the flight reservation. + */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object 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") + Object 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") + Object 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") + Object flightNumber; + + /** The fare class for the segment. */ + @SerializedName("service_class") + ServiceClass serviceClass; + + private Segment( + Long amount, + Object arrivalAirport, + Long arrivesAt, + Object carrier, + Long departsAt, + Object departureAirport, + Map extraParams, + Object 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 Object arrivalAirport; + + private Long arrivesAt; + + private Object carrier; + + private Long departsAt; + + private Object departureAirport; + + private Map extraParams; + + private Object flightNumber; + + private ServiceClass serviceClass; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Flight.Segment build() { + return new PaymentIntentUpdateParams.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 International Air Transport Association (IATA) airport code for the arrival + * airport. + */ + public Builder setArrivalAirport(EmptyParam 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; + } + + /** + * The International Air Transport Association (IATA) carrier code of the carrier + * operating the flight segment. + */ + public Builder setCarrier(EmptyParam 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; + } + + /** + * The International Air Transport Association (IATA) airport code for the departure + * airport. + */ + public Builder setDepartureAirport(EmptyParam 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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 flight number associated with the segment. */ + public Builder setFlightNumber(EmptyParam flightNumber) { + this.flightNumber = flightNumber; + return this; + } + + /** The fare class for the segment. */ + public Builder setServiceClass( + PaymentIntentUpdateParams.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 + @EqualsAndHashCode(callSuper = false) + public static class FlightData { + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Reservation reference. */ + @SerializedName("booking_number") + Object bookingNumber; + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + @SerializedName("computerized_reservation_system") + Object computerizedReservationSystem; + + /** Ticket restrictions. */ + @SerializedName("endorsements_and_restrictions") + Object endorsementsAndRestrictions; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances. */ + @SerializedName("insurances") + List insurances; + + /** List of passengers. */ + @SerializedName("passengers") + List passengers; + + /** Required. List of flight segments. */ + @SerializedName("segments") + List segments; + + /** Electronic ticket indicator. */ + @SerializedName("ticket_electronically_issued_indicator") + Boolean ticketElectronicallyIssuedIndicator; + + /** Required. Total cost breakdown. */ + @SerializedName("total") + Total total; + + /** Type of flight transaction. */ + @SerializedName("transaction_type") + TransactionType transactionType; + + private FlightData( + Affiliate affiliate, + Object bookingNumber, + Object computerizedReservationSystem, + Object endorsementsAndRestrictions, + Map extraParams, + List insurances, + List passengers, + List segments, + Boolean ticketElectronicallyIssuedIndicator, + Total total, + TransactionType transactionType) { + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.computerizedReservationSystem = computerizedReservationSystem; + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.segments = segments; + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + this.total = total; + this.transactionType = transactionType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Affiliate affiliate; + + private Object bookingNumber; + + private Object computerizedReservationSystem; + + private Object endorsementsAndRestrictions; + + private Map extraParams; + + private List insurances; + + private List passengers; + + private List segments; + + private Boolean ticketElectronicallyIssuedIndicator; + + private Total total; + + private TransactionType transactionType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData( + this.affiliate, + this.bookingNumber, + this.computerizedReservationSystem, + this.endorsementsAndRestrictions, + this.extraParams, + this.insurances, + this.passengers, + this.segments, + this.ticketElectronicallyIssuedIndicator, + this.total, + this.transactionType); + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Reservation reference. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Reservation reference. */ + public Builder setBookingNumber(EmptyParam bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + public Builder setComputerizedReservationSystem(String computerizedReservationSystem) { + this.computerizedReservationSystem = computerizedReservationSystem; + return this; + } + + /** Computerized reservation system used to make the reservation and purchase the ticket. */ + public Builder setComputerizedReservationSystem(EmptyParam computerizedReservationSystem) { + this.computerizedReservationSystem = computerizedReservationSystem; + return this; + } + + /** Ticket restrictions. */ + public Builder setEndorsementsAndRestrictions(String endorsementsAndRestrictions) { + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + return this; + } + + /** Ticket restrictions. */ + public Builder setEndorsementsAndRestrictions(EmptyParam endorsementsAndRestrictions) { + this.endorsementsAndRestrictions = endorsementsAndRestrictions; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FlightData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FlightData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData#passengers} for the field + * documentation. + */ + public Builder addPassenger( + PaymentIntentUpdateParams.PaymentDetails.FlightData.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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData#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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData#segments} for the field + * documentation. + */ + public Builder addSegment( + PaymentIntentUpdateParams.PaymentDetails.FlightData.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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData#segments} for the field + * documentation. + */ + public Builder addAllSegment( + List elements) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.addAll(elements); + return this; + } + + /** Electronic ticket indicator. */ + public Builder setTicketElectronicallyIssuedIndicator( + Boolean ticketElectronicallyIssuedIndicator) { + this.ticketElectronicallyIssuedIndicator = ticketElectronicallyIssuedIndicator; + return this; + } + + /** Required. Total cost breakdown. */ + public Builder setTotal(PaymentIntentUpdateParams.PaymentDetails.FlightData.Total total) { + this.total = total; + return this; + } + + /** Type of flight transaction. */ + public Builder setTransactionType( + PaymentIntentUpdateParams.PaymentDetails.FlightData.TransactionType transactionType) { + this.transactionType = transactionType; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + Object code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of affiliate partner. */ + @SerializedName("name") + Object name; + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + @SerializedName("travel_authorization_code") + Object travelAuthorizationCode; + + private Affiliate( + Object code, + Map extraParams, + Object name, + Object travelAuthorizationCode) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + this.travelAuthorizationCode = travelAuthorizationCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object code; + + private Map extraParams; + + private Object name; + + private Object travelAuthorizationCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Affiliate build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Affiliate( + this.code, this.extraParams, this.name, this.travelAuthorizationCode); + } + + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + return this; + } + + /** Affiliate partner code. */ + public Builder setCode(EmptyParam code) { + this.code = code; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData.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; + } + + /** Name of affiliate partner. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Name of affiliate partner. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + public Builder setTravelAuthorizationCode(String travelAuthorizationCode) { + this.travelAuthorizationCode = travelAuthorizationCode; + return this; + } + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + public Builder setTravelAuthorizationCode(EmptyParam travelAuthorizationCode) { + this.travelAuthorizationCode = travelAuthorizationCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Insurance cost. */ + @SerializedName("amount") + Long amount; + + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Insurance company name. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Required. Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Insurance build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Insurance cost. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Insurance company name. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Insurance company name. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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. Passenger's full name. */ + @SerializedName("name") + Object name; + + private Passenger(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Passenger build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData.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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData.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. Passenger's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. Passenger's full name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Segment { + /** Segment fare amount. */ + @SerializedName("amount") + Long amount; + + /** Required. Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Required. Airline carrier code. */ + @SerializedName("carrier_code") + Object carrierCode; + + /** Carrier name. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Segment currency. */ + @SerializedName("currency") + Object currency; + + /** Required. Departure details. */ + @SerializedName("departure") + Departure departure; + + /** Exchange ticket number. */ + @SerializedName("exchange_ticket_number") + Object exchangeTicketNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Fare basis code. */ + @SerializedName("fare_basis_code") + Object fareBasisCode; + + /** Additional fees. */ + @SerializedName("fees") + Long fees; + + /** Flight number. */ + @SerializedName("flight_number") + Object flightNumber; + + /** Stopover indicator. */ + @SerializedName("is_stop_over_indicator") + Boolean isStopOverIndicator; + + /** Refundable ticket indicator. */ + @SerializedName("refundable") + Boolean refundable; + + /** Required. Class of service. */ + @SerializedName("service_class") + ServiceClass serviceClass; + + /** Tax amount for segment. */ + @SerializedName("tax_amount") + Long taxAmount; + + /** Ticket number. */ + @SerializedName("ticket_number") + Object ticketNumber; + + private Segment( + Long amount, + Arrival arrival, + Object carrierCode, + Object carrierName, + Object currency, + Departure departure, + Object exchangeTicketNumber, + Map extraParams, + Object fareBasisCode, + Long fees, + Object flightNumber, + Boolean isStopOverIndicator, + Boolean refundable, + ServiceClass serviceClass, + Long taxAmount, + Object ticketNumber) { + this.amount = amount; + this.arrival = arrival; + this.carrierCode = carrierCode; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.exchangeTicketNumber = exchangeTicketNumber; + this.extraParams = extraParams; + this.fareBasisCode = fareBasisCode; + this.fees = fees; + this.flightNumber = flightNumber; + this.isStopOverIndicator = isStopOverIndicator; + this.refundable = refundable; + this.serviceClass = serviceClass; + this.taxAmount = taxAmount; + this.ticketNumber = ticketNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Arrival arrival; + + private Object carrierCode; + + private Object carrierName; + + private Object currency; + + private Departure departure; + + private Object exchangeTicketNumber; + + private Map extraParams; + + private Object fareBasisCode; + + private Long fees; + + private Object flightNumber; + + private Boolean isStopOverIndicator; + + private Boolean refundable; + + private ServiceClass serviceClass; + + private Long taxAmount; + + private Object ticketNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment( + this.amount, + this.arrival, + this.carrierCode, + this.carrierName, + this.currency, + this.departure, + this.exchangeTicketNumber, + this.extraParams, + this.fareBasisCode, + this.fees, + this.flightNumber, + this.isStopOverIndicator, + this.refundable, + this.serviceClass, + this.taxAmount, + this.ticketNumber); + } + + /** Segment fare amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Required. Arrival details. */ + public Builder setArrival( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Arrival arrival) { + this.arrival = arrival; + return this; + } + + /** Required. Airline carrier code. */ + public Builder setCarrierCode(String carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** Required. Airline carrier code. */ + public Builder setCarrierCode(EmptyParam carrierCode) { + this.carrierCode = carrierCode; + return this; + } + + /** Carrier name. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Carrier name. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Segment currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Segment currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Required. Departure details. */ + public Builder setDeparture( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Departure departure) { + this.departure = departure; + return this; + } + + /** Exchange ticket number. */ + public Builder setExchangeTicketNumber(String exchangeTicketNumber) { + this.exchangeTicketNumber = exchangeTicketNumber; + return this; + } + + /** Exchange ticket number. */ + public Builder setExchangeTicketNumber(EmptyParam exchangeTicketNumber) { + this.exchangeTicketNumber = exchangeTicketNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData.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; + } + + /** Fare basis code. */ + public Builder setFareBasisCode(String fareBasisCode) { + this.fareBasisCode = fareBasisCode; + return this; + } + + /** Fare basis code. */ + public Builder setFareBasisCode(EmptyParam fareBasisCode) { + this.fareBasisCode = fareBasisCode; + return this; + } + + /** Additional fees. */ + public Builder setFees(Long fees) { + this.fees = fees; + return this; + } + + /** Flight number. */ + public Builder setFlightNumber(String flightNumber) { + this.flightNumber = flightNumber; + return this; + } + + /** Flight number. */ + public Builder setFlightNumber(EmptyParam flightNumber) { + this.flightNumber = flightNumber; + return this; + } + + /** Stopover indicator. */ + public Builder setIsStopOverIndicator(Boolean isStopOverIndicator) { + this.isStopOverIndicator = isStopOverIndicator; + return this; + } + + /** Refundable ticket indicator. */ + public Builder setRefundable(Boolean refundable) { + this.refundable = refundable; + return this; + } + + /** Required. Class of service. */ + public Builder setServiceClass( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.ServiceClass + serviceClass) { + this.serviceClass = serviceClass; + return this; + } + + /** Tax amount for segment. */ + public Builder setTaxAmount(Long taxAmount) { + this.taxAmount = taxAmount; + return this; + } + + /** Ticket number. */ + public Builder setTicketNumber(String ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + + /** Ticket number. */ + public Builder setTicketNumber(EmptyParam ticketNumber) { + this.ticketNumber = ticketNumber; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Required. Arrival airport IATA code. */ + @SerializedName("airport") + Object airport; + + /** Arrival date/time. */ + @SerializedName("arrives_at") + Long arrivesAt; + + /** Arrival city. */ + @SerializedName("city") + Object city; + + /** Arrival country. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Arrival( + Object airport, + Long arrivesAt, + Object city, + Object country, + Map extraParams) { + this.airport = airport; + this.arrivesAt = arrivesAt; + this.city = city; + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object airport; + + private Long arrivesAt; + + private Object city; + + private Object country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Arrival build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Arrival( + this.airport, this.arrivesAt, this.city, this.country, this.extraParams); + } + + /** Required. Arrival airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } + + /** Required. Arrival airport IATA code. */ + public Builder setAirport(EmptyParam airport) { + this.airport = airport; + return this; + } + + /** Arrival date/time. */ + public Builder setArrivesAt(Long arrivesAt) { + this.arrivesAt = arrivesAt; + return this; + } + + /** Arrival city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Arrival city. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** Arrival country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** Arrival country. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Arrival#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Arrival#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 + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Required. Departure airport IATA code. */ + @SerializedName("airport") + Object airport; + + /** Departure city. */ + @SerializedName("city") + Object city; + + /** Departure country. */ + @SerializedName("country") + Object country; + + /** Required. Departure date/time. */ + @SerializedName("departs_at") + Long departsAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Departure( + Object airport, + Object city, + Object country, + Long departsAt, + Map extraParams) { + this.airport = airport; + this.city = city; + this.country = country; + this.departsAt = departsAt; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object airport; + + private Object city; + + private Object country; + + private Long departsAt; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Departure build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Departure( + this.airport, this.city, this.country, this.departsAt, this.extraParams); + } + + /** Required. Departure airport IATA code. */ + public Builder setAirport(String airport) { + this.airport = airport; + return this; + } + + /** Required. Departure airport IATA code. */ + public Builder setAirport(EmptyParam airport) { + this.airport = airport; + return this; + } + + /** Departure city. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Departure city. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** Departure country. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** Departure country. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** Required. Departure date/time. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Segment.Departure#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 ServiceClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), + + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceClass(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Total { + /** Required. Total flight amount. */ + @SerializedName("amount") + Long amount; + + /** Reason for credit. */ + @SerializedName("credit_reason") + CreditReason creditReason; + + /** Total currency. */ + @SerializedName("currency") + Object currency; + + /** Discount details. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges. */ + @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; + + /** Tax breakdown. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + CreditReason creditReason, + Object currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Tax tax) { + this.amount = amount; + this.creditReason = creditReason; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private CreditReason creditReason; + + private Object currency; + + private Discounts discounts; + + private List + extraCharges; + + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total( + this.amount, + this.creditReason, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.tax); + } + + /** Required. Total flight amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Reason for credit. */ + public Builder setCreditReason( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.CreditReason creditReason) { + this.creditReason = creditReason; + return this; + } + + /** Total currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Total currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Discount details. */ + public Builder setDiscounts( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.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 PaymentIntentUpdateParams.PaymentDetails.FlightData.Total#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 PaymentIntentUpdateParams.PaymentDetails.FlightData.Total#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FlightData.Total#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 breakdown. */ + public Builder setTax(PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + Object corporateClientCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Discounts(Object corporateClientCode, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object corporateClientCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Discounts build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Discounts( + this.corporateClientCode, this.extraParams); + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(EmptyParam corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Discounts#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 + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of additional charges. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 additional charges. */ + @SerializedName("type") + Type type; + + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } + + /** Amount of additional charges. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge#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 additional charges. */ + public Builder setType( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("additional_fees") + ADDITIONAL_FEES("additional_fees"), + + @SerializedName("ancillary_service_charges") + ANCILLARY_SERVICE_CHARGES("ancillary_service_charges"), + + @SerializedName("exchange_fee") + EXCHANGE_FEE("exchange_fee"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Array of tax details. */ + @SerializedName("taxes") + List taxes; + + private Tax( + Map extraParams, + List taxes) { + this.extraParams = extraParams; + this.taxes = taxes; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List taxes; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax( + this.extraParams, this.taxes); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.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; + } + + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } + + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax. */ + @SerializedName("type") + Object type; + + private Tax(Long amount, Map extraParams, Long rate, Object type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private Object type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.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 + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.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; + } + + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax. */ + public Builder setType(String type) { + this.type = type; + return this; + } + + /** Type of tax. */ + public Builder setType(EmptyParam type) { + this.type = type; + return this; + } + } + } + } + + public enum CreditReason implements ApiRequestParams.EnumParam { + @SerializedName("other") + OTHER("other"), + + @SerializedName("partial_ticket_refund") + PARTIAL_TICKET_REFUND("partial_ticket_refund"), + + @SerializedName("passenger_transport_ancillary_cancellation") + PASSENGER_TRANSPORT_ANCILLARY_CANCELLATION("passenger_transport_ancillary_cancellation"), + + @SerializedName("ticket_and_ancillary_cancellation") + TICKET_AND_ANCILLARY_CANCELLATION("ticket_and_ancillary_cancellation"), + + @SerializedName("ticket_cancellation") + TICKET_CANCELLATION("ticket_cancellation"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CreditReason(String value) { + this.value = value; + } + } + } + + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("exchange_ticket") + EXCHANGE_TICKET("exchange_ticket"), + + @SerializedName("miscellaneous") + MISCELLANEOUS("miscellaneous"), + + @SerializedName("refund") + REFUND("refund"), + + @SerializedName("ticket_purchase") + TICKET_PURCHASE("ticket_purchase"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TransactionType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object bookingNumber; + + /** The lodging category. */ + @SerializedName("category") + Category category; + + /** + * Required. Lodging 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") + Object 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") + Object 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") + Object propertyPhoneNumber; + + /** The room class for this purchase. */ + @SerializedName("room_class") + Object 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, + Object bookingNumber, + Category category, + Long checkinAt, + Long checkoutAt, + Object customerServicePhoneNumber, + Long dailyRoomRateAmount, + Delivery delivery, + List extraCharges, + Map extraParams, + Boolean fireSafetyActCompliance, + Object name, + Boolean noShow, + Long numberOfRooms, + List passengers, + Object propertyPhoneNumber, + Object 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 Object bookingNumber; + + private Category category; + + private Long checkinAt; + + private Long checkoutAt; + + private Object customerServicePhoneNumber; + + private Long dailyRoomRateAmount; + + private Delivery delivery; + + private List extraCharges; + + private Map extraParams; + + private Boolean fireSafetyActCompliance; + + private Object name; + + private Boolean noShow; + + private Long numberOfRooms; + + private List passengers; + + private Object propertyPhoneNumber; + + private Object roomClass; + + private Long roomNights; + + private Long totalRoomTaxAmount; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Lodging build() { + return new PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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 booking number associated with the lodging reservation. */ + public Builder setBookingNumber(EmptyParam bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** The lodging category. */ + public Builder setCategory( + PaymentIntentUpdateParams.PaymentDetails.Lodging.Category category) { + this.category = category; + return this; + } + + /** + * Required. Lodging 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 customer service phone number of the lodging company. */ + public Builder setCustomerServicePhoneNumber(EmptyParam 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( + PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.PaymentDetails.Lodging#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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; + } + + /** The name of the lodging location. */ + public Builder setName(EmptyParam 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 + * PaymentIntentUpdateParams.PaymentDetails.Lodging#passengers} for the field documentation. + */ + public Builder addPassenger( + PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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 phone number of the lodging location. */ + public Builder setPropertyPhoneNumber(EmptyParam propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } + + /** The room class for this purchase. */ + public Builder setRoomClass(String roomClass) { + this.roomClass = roomClass; + return this; + } + + /** The room class for this purchase. */ + public Builder setRoomClass(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Lodging.Address build() { + return new PaymentIntentUpdateParams.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; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object name; + + private Affiliate(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Lodging.Affiliate build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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; + } + + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Mode mode) { + this.mode = mode; + return this; + } + + /** Details of the recipient. */ + public Builder setRecipient( + PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** The email of the recipient the ticket is delivered to. */ + @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; + + /** The name of the recipient the ticket is delivered to. */ + @SerializedName("name") + Object name; + + /** The phone number of the recipient the ticket is delivered to. */ + @SerializedName("phone") + Object phone; + + private Recipient( + Object email, Map extraParams, Object name, Object 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 Object email; + + private Map extraParams; + + private Object name; + + private Object phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Lodging.Delivery.Recipient build() { + return new PaymentIntentUpdateParams.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; + } + + /** The email of the recipient the ticket is delivered to. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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 name of the recipient the ticket is delivered to. */ + public Builder setName(EmptyParam 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; + } + + /** The phone number of the recipient the ticket is delivered to. */ + public Builder setPhone(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + 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") + Object name; + + private Passenger(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Lodging.Passenger build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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; + } + + /** + * Required. Full name of the person or entity on the lodging + * reservation. + */ + public Builder setName(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + public static class LodgingData { + /** Accommodation details for the lodging. */ + @SerializedName("accommodation") + Accommodation accommodation; + + /** Affiliate details if applicable. */ + @SerializedName("affiliate") + Affiliate affiliate; + + /** Booking confirmation number for the lodging. */ + @SerializedName("booking_number") + Object bookingNumber; + + /** Required. Check-in date. */ + @SerializedName("checkin_at") + Long checkinAt; + + /** Required. Check-out date. */ + @SerializedName("checkout_at") + Long checkoutAt; + + /** Customer service phone number for the lodging company. */ + @SerializedName("customer_service_phone_number") + Object customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + @SerializedName("fire_safety_act_compliance_indicator") + Boolean fireSafetyActComplianceIndicator; + + /** List of guests for the lodging. */ + @SerializedName("guests") + List guests; + + /** Host details for the lodging. */ + @SerializedName("host") + Host host; + + /** List of insurances for the lodging. */ + @SerializedName("insurances") + List insurances; + + /** Whether the renter is a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; + + /** Renter ID number for the lodging. */ + @SerializedName("renter_id_number") + Object renterIdNumber; + + /** Renter name for the lodging. */ + @SerializedName("renter_name") + Object renterName; + + /** Required. Total details for the lodging. */ + @SerializedName("total") + Total total; + + private LodgingData( + Accommodation accommodation, + Affiliate affiliate, + Object bookingNumber, + Long checkinAt, + Long checkoutAt, + Object customerServicePhoneNumber, + Map extraParams, + Boolean fireSafetyActComplianceIndicator, + List guests, + Host host, + List insurances, + Boolean noShowIndicator, + Object renterIdNumber, + Object renterName, + Total total) { + this.accommodation = accommodation; + this.affiliate = affiliate; + this.bookingNumber = bookingNumber; + this.checkinAt = checkinAt; + this.checkoutAt = checkoutAt; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + this.guests = guests; + this.host = host; + this.insurances = insurances; + this.noShowIndicator = noShowIndicator; + this.renterIdNumber = renterIdNumber; + this.renterName = renterName; + this.total = total; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Accommodation accommodation; + + private Affiliate affiliate; + + private Object bookingNumber; + + private Long checkinAt; + + private Long checkoutAt; + + private Object customerServicePhoneNumber; + + private Map extraParams; + + private Boolean fireSafetyActComplianceIndicator; + + private List guests; + + private Host host; + + private List insurances; + + private Boolean noShowIndicator; + + private Object renterIdNumber; + + private Object renterName; + + private Total total; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData( + this.accommodation, + this.affiliate, + this.bookingNumber, + this.checkinAt, + this.checkoutAt, + this.customerServicePhoneNumber, + this.extraParams, + this.fireSafetyActComplianceIndicator, + this.guests, + this.host, + this.insurances, + this.noShowIndicator, + this.renterIdNumber, + this.renterName, + this.total); + } + + /** Accommodation details for the lodging. */ + public Builder setAccommodation( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Accommodation accommodation) { + this.accommodation = accommodation; + return this; + } + + /** Affiliate details if applicable. */ + public Builder setAffiliate( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Affiliate affiliate) { + this.affiliate = affiliate; + return this; + } + + /** Booking confirmation number for the lodging. */ + public Builder setBookingNumber(String bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Booking confirmation number for the lodging. */ + public Builder setBookingNumber(EmptyParam bookingNumber) { + this.bookingNumber = bookingNumber; + return this; + } + + /** Required. Check-in date. */ + public Builder setCheckinAt(Long checkinAt) { + this.checkinAt = checkinAt; + return this; + } + + /** Required. Check-out date. */ + public Builder setCheckoutAt(Long checkoutAt) { + this.checkoutAt = checkoutAt; + return this; + } + + /** Customer service phone number for the lodging company. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** Customer service phone number for the lodging company. */ + public Builder setCustomerServicePhoneNumber(EmptyParam customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.LodgingData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.LodgingData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + public Builder setFireSafetyActComplianceIndicator( + Boolean fireSafetyActComplianceIndicator) { + this.fireSafetyActComplianceIndicator = fireSafetyActComplianceIndicator; + return this; + } + + /** + * Add an element to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData#guests} for the field documentation. + */ + public Builder addGuest( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Guest element) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.add(element); + return this; + } + + /** + * Add all elements to `guests` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData#guests} for the field documentation. + */ + public Builder addAllGuest( + List elements) { + if (this.guests == null) { + this.guests = new ArrayList<>(); + } + this.guests.addAll(elements); + return this; + } + + /** Host details for the lodging. */ + public Builder setHost(PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host host) { + this.host = host; + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData#insurances} for the field + * documentation. + */ + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Insurance element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData#insurances} for the field + * documentation. + */ + public Builder addAllInsurance( + List elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } + + /** Whether the renter is a no-show. */ + public Builder setNoShowIndicator(Boolean noShowIndicator) { + this.noShowIndicator = noShowIndicator; + return this; + } + + /** Renter ID number for the lodging. */ + public Builder setRenterIdNumber(String renterIdNumber) { + this.renterIdNumber = renterIdNumber; + return this; + } + + /** Renter ID number for the lodging. */ + public Builder setRenterIdNumber(EmptyParam renterIdNumber) { + this.renterIdNumber = renterIdNumber; + return this; + } + + /** Renter name for the lodging. */ + public Builder setRenterName(String renterName) { + this.renterName = renterName; + return this; + } + + /** Renter name for the lodging. */ + public Builder setRenterName(EmptyParam renterName) { + this.renterName = renterName; + return this; + } + + /** Required. Total details for the lodging. */ + public Builder setTotal(PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total total) { + this.total = total; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Accommodation { + /** Type of accommodation. */ + @SerializedName("accommodation_type") + AccommodationType accommodationType; + + /** Bed type. */ + @SerializedName("bed_type") + Object bedType; + + /** Daily accommodation rate in cents. */ + @SerializedName("daily_rate_amount") + Long dailyRateAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Number of nights. */ + @SerializedName("nights") + Long nights; + + /** Number of rooms, cabanas, apartments, and so on. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; + + /** Rate type. */ + @SerializedName("rate_type") + Object rateType; + + /** Whether smoking is allowed. */ + @SerializedName("smoking_indicator") + Boolean smokingIndicator; + + private Accommodation( + AccommodationType accommodationType, + Object bedType, + Long dailyRateAmount, + Map extraParams, + Long nights, + Long numberOfRooms, + Object rateType, + Boolean smokingIndicator) { + this.accommodationType = accommodationType; + this.bedType = bedType; + this.dailyRateAmount = dailyRateAmount; + this.extraParams = extraParams; + this.nights = nights; + this.numberOfRooms = numberOfRooms; + this.rateType = rateType; + this.smokingIndicator = smokingIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AccommodationType accommodationType; + + private Object bedType; + + private Long dailyRateAmount; + + private Map extraParams; + + private Long nights; + + private Long numberOfRooms; + + private Object rateType; + + private Boolean smokingIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Accommodation build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Accommodation( + this.accommodationType, + this.bedType, + this.dailyRateAmount, + this.extraParams, + this.nights, + this.numberOfRooms, + this.rateType, + this.smokingIndicator); + } + + /** Type of accommodation. */ + public Builder setAccommodationType( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Accommodation.AccommodationType + accommodationType) { + this.accommodationType = accommodationType; + return this; + } + + /** Bed type. */ + public Builder setBedType(String bedType) { + this.bedType = bedType; + return this; + } + + /** Bed type. */ + public Builder setBedType(EmptyParam bedType) { + this.bedType = bedType; + return this; + } + + /** Daily accommodation rate in cents. */ + public Builder setDailyRateAmount(Long dailyRateAmount) { + this.dailyRateAmount = dailyRateAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Accommodation#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Accommodation#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Number of nights. */ + public Builder setNights(Long nights) { + this.nights = nights; + return this; + } + + /** Number of rooms, cabanas, apartments, and so on. */ + public Builder setNumberOfRooms(Long numberOfRooms) { + this.numberOfRooms = numberOfRooms; + return this; + } + + /** Rate type. */ + public Builder setRateType(String rateType) { + this.rateType = rateType; + return this; + } + + /** Rate type. */ + public Builder setRateType(EmptyParam rateType) { + this.rateType = rateType; + return this; + } + + /** Whether smoking is allowed. */ + public Builder setSmokingIndicator(Boolean smokingIndicator) { + this.smokingIndicator = smokingIndicator; + return this; + } + } + + public enum AccommodationType implements ApiRequestParams.EnumParam { + @SerializedName("apartment") + APARTMENT("apartment"), + + @SerializedName("cabana") + CABANA("cabana"), + + @SerializedName("house") + HOUSE("house"), + + @SerializedName("penthouse") + PENTHOUSE("penthouse"), + + @SerializedName("room") + ROOM("room"), + + @SerializedName("standard") + STANDARD("standard"), + + @SerializedName("suite") + SUITE("suite"), + + @SerializedName("villa") + VILLA("villa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccommodationType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate { + /** Affiliate partner code. */ + @SerializedName("code") + Object code; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Affiliate partner name. */ + @SerializedName("name") + Object name; + + private Affiliate(Object code, Map extraParams, Object name) { + this.code = code; + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object code; + + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Affiliate build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Affiliate( + this.code, this.extraParams, this.name); + } + + /** Affiliate partner code. */ + public Builder setCode(String code) { + this.code = code; + return this; + } + + /** Affiliate partner code. */ + public Builder setCode(EmptyParam code) { + this.code = code; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.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 + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.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; + } + + /** Affiliate partner name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Affiliate partner name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Guest { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Guest's full name. */ + @SerializedName("name") + Object name; + + private Guest(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Guest build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Guest( + 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 PaymentIntentUpdateParams.PaymentDetails.LodgingData.Guest#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.LodgingData.Guest#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. Guest's full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. Guest's full name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Host { + /** Address of the host. */ + @SerializedName("address") + Address address; + + /** Host's country of domicile. */ + @SerializedName("country_of_domicile") + Object countryOfDomicile; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Reference number for the host. */ + @SerializedName("host_reference") + Object hostReference; + + /** Type of host. */ + @SerializedName("host_type") + HostType hostType; + + /** Name of the lodging property or host. */ + @SerializedName("name") + Object name; + + /** Total number of reservations for the host. */ + @SerializedName("number_of_reservations") + Long numberOfReservations; + + /** Property phone number. */ + @SerializedName("property_phone_number") + Object propertyPhoneNumber; + + /** Host's registration date. */ + @SerializedName("registered_at") + Long registeredAt; + + private Host( + Address address, + Object countryOfDomicile, + Map extraParams, + Object hostReference, + HostType hostType, + Object name, + Long numberOfReservations, + Object propertyPhoneNumber, + Long registeredAt) { + this.address = address; + this.countryOfDomicile = countryOfDomicile; + this.extraParams = extraParams; + this.hostReference = hostReference; + this.hostType = hostType; + this.name = name; + this.numberOfReservations = numberOfReservations; + this.propertyPhoneNumber = propertyPhoneNumber; + this.registeredAt = registeredAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Object countryOfDomicile; + + private Map extraParams; + + private Object hostReference; + + private HostType hostType; + + private Object name; + + private Long numberOfReservations; + + private Object propertyPhoneNumber; + + private Long registeredAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host( + this.address, + this.countryOfDomicile, + this.extraParams, + this.hostReference, + this.hostType, + this.name, + this.numberOfReservations, + this.propertyPhoneNumber, + this.registeredAt); + } + + /** Address of the host. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host.Address address) { + this.address = address; + return this; + } + + /** Host's country of domicile. */ + public Builder setCountryOfDomicile(String countryOfDomicile) { + this.countryOfDomicile = countryOfDomicile; + return this; + } + + /** Host's country of domicile. */ + public Builder setCountryOfDomicile(EmptyParam countryOfDomicile) { + this.countryOfDomicile = countryOfDomicile; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Reference number for the host. */ + public Builder setHostReference(String hostReference) { + this.hostReference = hostReference; + return this; + } + + /** Reference number for the host. */ + public Builder setHostReference(EmptyParam hostReference) { + this.hostReference = hostReference; + return this; + } + + /** Type of host. */ + public Builder setHostType( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host.HostType hostType) { + this.hostType = hostType; + return this; + } + + /** Name of the lodging property or host. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Name of the lodging property or host. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Total number of reservations for the host. */ + public Builder setNumberOfReservations(Long numberOfReservations) { + this.numberOfReservations = numberOfReservations; + return this; + } + + /** Property phone number. */ + public Builder setPropertyPhoneNumber(String propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } + + /** Property phone number. */ + public Builder setPropertyPhoneNumber(EmptyParam propertyPhoneNumber) { + this.propertyPhoneNumber = propertyPhoneNumber; + return this; + } + + /** Host's registration date. */ + public Builder setRegisteredAt(Long registeredAt) { + this.registeredAt = registeredAt; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** Required. City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** Required. ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host.Address build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** Required. City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host.Address#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Host.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; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Required. ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + + public enum HostType implements ApiRequestParams.EnumParam { + @SerializedName("hostel") + HOSTEL("hostel"), + + @SerializedName("hotel") + HOTEL("hotel"), + + @SerializedName("owner") + OWNER("owner"), + + @SerializedName("rental_agency") + RENTAL_AGENCY("rental_agency"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + HostType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Required. Price of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the insurance amount. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Required. Type of insurance coverage. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + private Insurance( + Long amount, + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType) { + this.amount = amount; + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Object currency; + + private Map extraParams; + + private Object insuranceCompanyName; + + private InsuranceType insuranceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Insurance build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Insurance( + this.amount, + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType); + } + + /** Required. Price of the insurance coverage in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency of the insurance amount. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Insurance#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Name of the insurance company. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Required. Type of insurance coverage. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Total { + /** Required. Total price of the lodging reservation in cents. */ + @SerializedName("amount") + Long amount; + + /** Cash advances in cents. */ + @SerializedName("cash_advances") + Long cashAdvances; + + /** Currency of the total amount. */ + @SerializedName("currency") + Object currency; + + /** Discount details for the lodging. */ + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the lodging. */ + @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; + + /** Prepaid amount in cents. */ + @SerializedName("prepaid_amount") + Long prepaidAmount; + + /** Tax breakdown for the lodging reservation. */ + @SerializedName("tax") + Tax tax; + + private Total( + Long amount, + Long cashAdvances, + Object currency, + Discounts discounts, + List + extraCharges, + Map extraParams, + Long prepaidAmount, + Tax tax) { + this.amount = amount; + this.cashAdvances = cashAdvances; + this.currency = currency; + this.discounts = discounts; + this.extraCharges = extraCharges; + this.extraParams = extraParams; + this.prepaidAmount = prepaidAmount; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Long cashAdvances; + + private Object currency; + + private Discounts discounts; + + private List + extraCharges; + + private Map extraParams; + + private Long prepaidAmount; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total( + this.amount, + this.cashAdvances, + this.currency, + this.discounts, + this.extraCharges, + this.extraParams, + this.prepaidAmount, + this.tax); + } + + /** Required. Total price of the lodging reservation in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Cash advances in cents. */ + public Builder setCashAdvances(Long cashAdvances) { + this.cashAdvances = cashAdvances; + return this; + } + + /** Currency of the total amount. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency of the total amount. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Discount details for the lodging. */ + public Builder setDiscounts( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Discounts discounts) { + this.discounts = discounts; + 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 + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total#extraCharges} for the field + * documentation. + */ + public Builder addExtraCharge( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.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 PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total#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 PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Prepaid amount in cents. */ + public Builder setPrepaidAmount(Long prepaidAmount) { + this.prepaidAmount = prepaidAmount; + return this; + } + + /** Tax breakdown for the lodging reservation. */ + public Builder setTax( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Discounts { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + Object corporateClientCode; + + /** Coupon code. */ + @SerializedName("coupon") + Object coupon; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Discounts( + Object corporateClientCode, Object coupon, Map extraParams) { + this.corporateClientCode = corporateClientCode; + this.coupon = coupon; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object corporateClientCode; + + private Object coupon; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Discounts build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Discounts( + this.corporateClientCode, this.coupon, this.extraParams); + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(String corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** Corporate client discount code. */ + public Builder setCorporateClientCode(EmptyParam corporateClientCode) { + this.corporateClientCode = corporateClientCode; + return this; + } + + /** Coupon code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } + + /** Coupon code. */ + public Builder setCoupon(EmptyParam coupon) { + this.coupon = coupon; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Discounts#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Discounts#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 + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge { + /** Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 extra charge. */ + @SerializedName("type") + Type type; + + private ExtraCharge(Long amount, Map extraParams, Type type) { + this.amount = amount; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge( + this.amount, this.extraParams, this.type); + } + + /** Amount of the extra charge in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge#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 extra charge. */ + public Builder setType( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.ExtraCharge.Type type) { + this.type = type; + return this; + } + } + + public enum Type 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("phone") + PHONE("phone"), + + @SerializedName("restaurant") + RESTAURANT("restaurant"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; + + /** Tax details. */ + @SerializedName("taxes") + List taxes; + + private Tax( + Map extraParams, + Boolean taxExemptIndicator, + List taxes) { + this.extraParams = extraParams; + this.taxExemptIndicator = taxExemptIndicator; + this.taxes = taxes; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean taxExemptIndicator; + + private List taxes; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax( + this.extraParams, this.taxExemptIndicator, this.taxes); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.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 + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.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; + } + + /** Indicates whether the transaction is tax exempt. */ + public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { + this.taxExemptIndicator = taxExemptIndicator; + return this; + } + + /** + * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addTax( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.add(element); + return this; + } + + /** + * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * documentation. + */ + public Builder addAllTax( + List elements) { + if (this.taxes == null) { + this.taxes = new ArrayList<>(); + } + this.taxes.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** Tax amount in cents. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + Object type; + + private Tax(Long amount, Map extraParams, Long rate, Object type) { + this.amount = amount; + this.extraParams = extraParams; + this.rate = rate; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Long rate; + + private Object type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax( + this.amount, this.extraParams, this.rate, this.type); + } + + /** Tax amount in cents. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.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 + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.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; + } + + /** Tax rate. */ + public Builder setRate(Long rate) { + this.rate = rate; + return this; + } + + /** Type of tax applied. */ + public Builder setType(String type) { + this.type = type; + return this; + } + + /** Type of tax applied. */ + public Builder setType(EmptyParam type) { + this.type = type; + return this; + } + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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") + Object 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, + Object 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 Object name; + + private Long startsAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Subscription build() { + return new PaymentIntentUpdateParams.PaymentDetails.Subscription( + this.affiliate, + this.autoRenewal, + this.billingInterval, + this.endsAt, + this.extraParams, + this.name, + this.startsAt); + } + + /** Affiliate details for this purchase. */ + public Builder setAffiliate( + PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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; + } + + /** + * Required. Name of the product on subscription. e.g. Apple Music + * Subscription + */ + public Builder setName(EmptyParam 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 + @EqualsAndHashCode(callSuper = false) + 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") + Object name; + + private Affiliate(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.Subscription.Affiliate build() { + return new PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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; + } + + /** Required. The name of the affiliate that originated the purchase. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentDetails.Subscription.BillingInterval build() { + return new PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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 + @EqualsAndHashCode(callSuper = false) + 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 Alma PaymentMethod, this hash contains details about the Alma payment method. + */ + @SerializedName("alma") + Alma alma; + + /** + * 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; + + /** + * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie + * payment method. + */ + @SerializedName("billie") + Billie billie; + + /** + * 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 Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + + /** + * 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 Gopay PaymentMethod, this hash contains details about the Gopay payment method. + */ + @SerializedName("gopay") + Gopay gopay; + + /** + * 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 IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + + /** + * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment + * method. + */ + @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 kakao_pay} PaymentMethod, this hash contains details about the Kakao Pay + * payment method. + */ + @SerializedName("kakao_pay") + KakaoPay kakaoPay; + + /** + * 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 a {@code kr_card} PaymentMethod, this hash contains details about the Korean Card + * payment method. + */ + @SerializedName("kr_card") + KrCard krCard; + + /** + * 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 a {@code naver_pay} PaymentMethod, this hash contains details about the Naver Pay + * payment method. + */ + @SerializedName("naver_pay") + NaverPay naverPay; + + /** + * If this is an nz_bank_account PaymentMethod, this hash contains details about the + * nz_bank_account payment method. + */ + @SerializedName("nz_bank_account") + NzBankAccount nzBankAccount; + + /** + * 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 pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + + /** + * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment + * method. + */ + @SerializedName("payco") + Payco payco; + + /** + * 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 paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + + /** + * 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; + + /** + * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment + * method. + */ + @SerializedName("qris") + Qris qris; + + /** + * 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 samsung_pay} PaymentMethod, this hash contains details about the * SamsungPay payment method. */ @SerializedName("samsung_pay") SamsungPay samsungPay; - /** - * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay - * payment method. - */ - @SerializedName("satispay") - Satispay satispay; + /** + * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay + * payment method. + */ + @SerializedName("satispay") + Satispay satispay; + + /** + * 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 Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment + * method. + */ + @SerializedName("shopeepay") + Shopeepay shopeepay; + + /** + * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT + * payment method. + */ + @SerializedName("sofort") + Sofort sofort; + + /** This hash contains details about the Stripe balance payment method. */ + @SerializedName("stripe_balance") + StripeBalance stripeBalance; + + /** + * 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, + Alma alma, + AmazonPay amazonPay, + AuBecsDebit auBecsDebit, + BacsDebit bacsDebit, + Bancontact bancontact, + Billie billie, + BillingDetails billingDetails, + Blik blik, + Boleto boleto, + Cashapp cashapp, + Crypto crypto, + CustomerBalance customerBalance, + Eps eps, + Map extraParams, + Fpx fpx, + Giropay giropay, + Gopay gopay, + Grabpay grabpay, + IdBankTransfer idBankTransfer, + Ideal ideal, + InteracPresent interacPresent, + KakaoPay kakaoPay, + Klarna klarna, + Konbini konbini, + KrCard krCard, + Link link, + MbWay mbWay, + Map metadata, + Mobilepay mobilepay, + Multibanco multibanco, + NaverPay naverPay, + NzBankAccount nzBankAccount, + Oxxo oxxo, + P24 p24, + PayByBank payByBank, + Payco payco, + Paynow paynow, + Paypal paypal, + Paypay paypay, + Payto payto, + Pix pix, + Promptpay promptpay, + Qris qris, + RadarOptions radarOptions, + Rechnung rechnung, + RevolutPay revolutPay, + SamsungPay samsungPay, + Satispay satispay, + SepaDebit sepaDebit, + Shopeepay shopeepay, + Sofort sofort, + StripeBalance stripeBalance, + 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.alma = alma; + this.amazonPay = amazonPay; + this.auBecsDebit = auBecsDebit; + this.bacsDebit = bacsDebit; + this.bancontact = bancontact; + this.billie = billie; + this.billingDetails = billingDetails; + this.blik = blik; + this.boleto = boleto; + this.cashapp = cashapp; + this.crypto = crypto; + this.customerBalance = customerBalance; + this.eps = eps; + this.extraParams = extraParams; + this.fpx = fpx; + this.giropay = giropay; + this.gopay = gopay; + this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; + this.ideal = ideal; + this.interacPresent = interacPresent; + this.kakaoPay = kakaoPay; + this.klarna = klarna; + this.konbini = konbini; + this.krCard = krCard; + this.link = link; + this.mbWay = mbWay; + this.metadata = metadata; + this.mobilepay = mobilepay; + this.multibanco = multibanco; + this.naverPay = naverPay; + this.nzBankAccount = nzBankAccount; + this.oxxo = oxxo; + this.p24 = p24; + this.payByBank = payByBank; + this.payco = payco; + this.paynow = paynow; + this.paypal = paypal; + this.paypay = paypay; + this.payto = payto; + this.pix = pix; + this.promptpay = promptpay; + this.qris = qris; + this.radarOptions = radarOptions; + this.rechnung = rechnung; + this.revolutPay = revolutPay; + this.samsungPay = samsungPay; + this.satispay = satispay; + this.sepaDebit = sepaDebit; + this.shopeepay = shopeepay; + this.sofort = sofort; + this.stripeBalance = stripeBalance; + 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 Alma alma; + + private AmazonPay amazonPay; + + private AuBecsDebit auBecsDebit; + + private BacsDebit bacsDebit; + + private Bancontact bancontact; + + private Billie billie; + + private BillingDetails billingDetails; + + private Blik blik; + + private Boleto boleto; + + private Cashapp cashapp; + + private Crypto crypto; + + private CustomerBalance customerBalance; + + private Eps eps; + + private Map extraParams; + + private Fpx fpx; + + private Giropay giropay; + + private Gopay gopay; + + private Grabpay grabpay; + + private IdBankTransfer idBankTransfer; + + private Ideal ideal; + + private InteracPresent interacPresent; + + private KakaoPay kakaoPay; + + private Klarna klarna; + + private Konbini konbini; + + private KrCard krCard; + + private Link link; + + private MbWay mbWay; + + private Map metadata; + + private Mobilepay mobilepay; + + private Multibanco multibanco; + + private NaverPay naverPay; + + private NzBankAccount nzBankAccount; + + private Oxxo oxxo; + + private P24 p24; + + private PayByBank payByBank; + + private Payco payco; + + private Paynow paynow; + + private Paypal paypal; + + private Paypay paypay; + + private Payto payto; + + private Pix pix; + + private Promptpay promptpay; + + private Qris qris; + + private RadarOptions radarOptions; + + private Rechnung rechnung; + + private RevolutPay revolutPay; + + private SamsungPay samsungPay; + + private Satispay satispay; + + private SepaDebit sepaDebit; + + private Shopeepay shopeepay; + + private Sofort sofort; + + private StripeBalance stripeBalance; + + 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 PaymentIntentUpdateParams.PaymentMethodData build() { + return new PaymentIntentUpdateParams.PaymentMethodData( + this.acssDebit, + this.affirm, + this.afterpayClearpay, + this.alipay, + this.allowRedisplay, + this.alma, + this.amazonPay, + this.auBecsDebit, + this.bacsDebit, + this.bancontact, + this.billie, + this.billingDetails, + this.blik, + this.boleto, + this.cashapp, + this.crypto, + this.customerBalance, + this.eps, + this.extraParams, + this.fpx, + this.giropay, + this.gopay, + this.grabpay, + this.idBankTransfer, + this.ideal, + this.interacPresent, + this.kakaoPay, + this.klarna, + this.konbini, + this.krCard, + this.link, + this.mbWay, + this.metadata, + this.mobilepay, + this.multibanco, + this.naverPay, + this.nzBankAccount, + this.oxxo, + this.p24, + this.payByBank, + this.payco, + this.paynow, + this.paypal, + this.paypay, + this.payto, + this.pix, + this.promptpay, + this.qris, + this.radarOptions, + this.rechnung, + this.revolutPay, + this.samsungPay, + this.satispay, + this.sepaDebit, + this.shopeepay, + this.sofort, + this.stripeBalance, + 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(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.PaymentMethodData.AllowRedisplay allowRedisplay) { + this.allowRedisplay = allowRedisplay; + return this; + } + + /** + * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + */ + public Builder setAlma(PaymentIntentUpdateParams.PaymentMethodData.Alma alma) { + this.alma = alma; + return this; + } + + /** + * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay + * payment method. + */ + public Builder setAmazonPay(PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.PaymentMethodData.Bancontact bancontact) { + this.bancontact = bancontact; + return this; + } + + /** + * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie + * payment method. + */ + public Builder setBillie(PaymentIntentUpdateParams.PaymentMethodData.Billie billie) { + this.billie = billie; + return this; + } + + /** + * Billing information associated with the PaymentMethod that may be used or required by + * particular types of payment methods. + */ + public Builder setBillingDetails( + PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.PaymentMethodData.Cashapp cashapp) { + this.cashapp = cashapp; + return this; + } + + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(PaymentIntentUpdateParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; + return this; + } + + /** + * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the + * CustomerBalance payment method. + */ + public Builder setCustomerBalance( + PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.PaymentMethodData#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentUpdateParams.PaymentMethodData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment + * method. + */ + public Builder setFpx(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.PaymentMethodData.Giropay giropay) { + this.giropay = giropay; + return this; + } + + /** + * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment + * method. + */ + public Builder setGopay(PaymentIntentUpdateParams.PaymentMethodData.Gopay gopay) { + this.gopay = gopay; + return this; + } + + /** + * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay + * payment method. + */ + public Builder setGrabpay(PaymentIntentUpdateParams.PaymentMethodData.Grabpay grabpay) { + this.grabpay = grabpay; + return this; + } + + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL + * payment method. + */ + public Builder setIdeal(PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.PaymentMethodData.InteracPresent interacPresent) { + this.interacPresent = interacPresent; + return this; + } + + /** + * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao + * Pay payment method. + */ + public Builder setKakaoPay(PaymentIntentUpdateParams.PaymentMethodData.KakaoPay kakaoPay) { + this.kakaoPay = kakaoPay; + return this; + } + + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method. + */ + public Builder setKlarna(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.PaymentMethodData.Konbini konbini) { + this.konbini = konbini; + return this; + } + + /** + * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean + * Card payment method. + */ + public Builder setKrCard(PaymentIntentUpdateParams.PaymentMethodData.KrCard krCard) { + this.krCard = krCard; + return this; + } + + /** + * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment + * method. + */ + public Builder setLink(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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 + * PaymentIntentUpdateParams.PaymentMethodData#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentUpdateParams.PaymentMethodData#metadata} for the field + * documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * If this is a {@code mobilepay} PaymentMethod, this hash contains details about the + * MobilePay payment method. + */ + public Builder setMobilepay(PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.PaymentMethodData.Multibanco multibanco) { + this.multibanco = multibanco; + return this; + } + + /** + * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver + * Pay payment method. + */ + public Builder setNaverPay(PaymentIntentUpdateParams.PaymentMethodData.NaverPay naverPay) { + this.naverPay = naverPay; + return this; + } + + /** + * If this is an nz_bank_account PaymentMethod, this hash contains details about the + * nz_bank_account payment method. + */ + public Builder setNzBankAccount( + PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount nzBankAccount) { + this.nzBankAccount = nzBankAccount; + return this; + } + + /** + * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment + * method. + */ + public Builder setOxxo(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.PaymentMethodData.P24 p24) { + this.p24 = p24; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentIntentUpdateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO + * payment method. + */ + public Builder setPayco(PaymentIntentUpdateParams.PaymentMethodData.Payco payco) { + this.payco = payco; + return this; + } + + /** + * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow + * payment method. + */ + public Builder setPaynow(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.PaymentMethodData.Paypal paypal) { + this.paypal = paypal; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentIntentUpdateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. + */ + public Builder setPayto(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.PaymentMethodData.Promptpay promptpay) { + this.promptpay = promptpay; + return this; + } + + /** + * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment + * method. + */ + public Builder setQris(PaymentIntentUpdateParams.PaymentMethodData.Qris qris) { + this.qris = qris; + return this; + } + + /** + * Options to configure Radar. See Radar + * Session for more information. + */ + public Builder setRadarOptions( + PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.PaymentMethodData.RevolutPay revolutPay) { + this.revolutPay = revolutPay; + return this; + } + + /** + * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the + * SamsungPay payment method. + */ + public Builder setSamsungPay( + PaymentIntentUpdateParams.PaymentMethodData.SamsungPay samsungPay) { + this.samsungPay = samsungPay; + return this; + } + + /** + * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay + * payment method. + */ + public Builder setSatispay(PaymentIntentUpdateParams.PaymentMethodData.Satispay satispay) { + this.satispay = satispay; + return this; + } + + /** + * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA + * debit bank account. + */ + public Builder setSepaDebit(PaymentIntentUpdateParams.PaymentMethodData.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; + return this; + } + + /** + * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay + * payment method. + */ + public Builder setShopeepay(PaymentIntentUpdateParams.PaymentMethodData.Shopeepay shopeepay) { + this.shopeepay = shopeepay; + return this; + } + + /** + * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT + * payment method. + */ + public Builder setSofort(PaymentIntentUpdateParams.PaymentMethodData.Sofort sofort) { + this.sofort = sofort; + return this; + } + + /** This hash contains details about the Stripe balance payment method. */ + public Builder setStripeBalance( + PaymentIntentUpdateParams.PaymentMethodData.StripeBalance stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } + + /** + * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish + * payment method. + */ + public Builder setSwish(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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( + PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.PaymentMethodData.Zip zip) { + this.zip = zip; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit { + /** Required. Customer's bank account number. */ + @SerializedName("account_number") + Object accountNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Institution number of the customer's bank. */ + @SerializedName("institution_number") + Object institutionNumber; + + /** Required. Transit number of the customer's bank. */ + @SerializedName("transit_number") + Object transitNumber; + + private AcssDebit( + Object accountNumber, + Map extraParams, + Object institutionNumber, + Object transitNumber) { + this.accountNumber = accountNumber; + this.extraParams = extraParams; + this.institutionNumber = institutionNumber; + this.transitNumber = transitNumber; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountNumber; + + private Map extraParams; + + private Object institutionNumber; + + private Object transitNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.AcssDebit build() { + return new PaymentIntentUpdateParams.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; + } + + /** Required. Customer's bank account number. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AcssDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AcssDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Institution number of the customer's bank. */ + public Builder setInstitutionNumber(String institutionNumber) { + this.institutionNumber = institutionNumber; + return this; + } + + /** Required. Institution number of the customer's bank. */ + public Builder setInstitutionNumber(EmptyParam institutionNumber) { + this.institutionNumber = institutionNumber; + return this; + } + + /** Required. Transit number of the customer's bank. */ + public Builder setTransitNumber(String transitNumber) { + this.transitNumber = transitNumber; + return this; + } + + /** Required. Transit number of the customer's bank. */ + public Builder setTransitNumber(EmptyParam transitNumber) { + this.transitNumber = transitNumber; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.Affirm build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.Alipay build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.Alipay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alipay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alma { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Alma(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 PaymentIntentUpdateParams.PaymentMethodData.Alma build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Alma(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alma#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alma#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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.AmazonPay build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit { + /** Required. The account number for the bank account. */ + @SerializedName("account_number") + Object accountNumber; + + /** Required. Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + Object bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private AuBecsDebit(Object accountNumber, Object bsbNumber, Map extraParams) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountNumber; + + private Object bsbNumber; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit build() { + return new PaymentIntentUpdateParams.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. The account number for the bank account. */ + public Builder setAccountNumber(EmptyParam 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; + } + + /** Required. Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(EmptyParam bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebit { + /** Account number of the bank account that the funds will be debited from. */ + @SerializedName("account_number") + Object accountNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + Object sortCode; + + private BacsDebit(Object accountNumber, Map extraParams, Object sortCode) { + this.accountNumber = accountNumber; + this.extraParams = extraParams; + this.sortCode = sortCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountNumber; + + private Map extraParams; + + private Object sortCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.BacsDebit build() { + return new PaymentIntentUpdateParams.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; + } + + /** Account number of the bank account that the funds will be debited from. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.BacsDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.BacsDebit#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + public Builder setSortCode(String sortCode) { + this.sortCode = sortCode; + return this; + } + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + public Builder setSortCode(EmptyParam sortCode) { + this.sortCode = sortCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.Bancontact build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.Bancontact#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Bancontact#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billie { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Billie(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 PaymentIntentUpdateParams.PaymentMethodData.Billie build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Billie(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Billie#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Billie#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 + @EqualsAndHashCode(callSuper = false) + 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; + + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and + * non-LATAM sellers. + */ + @SerializedName("tax_id") + Object taxId; + + private BillingDetails( + Object address, + Object email, + Map extraParams, + Object name, + Object phone, + Object taxId) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + this.taxId = taxId; + } + + 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; + + private Object taxId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.BillingDetails build() { + return new PaymentIntentUpdateParams.PaymentMethodData.BillingDetails( + this.address, this.email, this.extraParams, this.name, this.phone, this.taxId); + } + + /** Billing address. */ + public Builder setAddress( + PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Full name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Billing phone number (including extension). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** Billing phone number (including extension). */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and + * non-LATAM sellers. + */ + public Builder setTaxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * Taxpayer identification number. Used only for transactions between LATAM buyers and + * non-LATAM sellers. + */ + public Builder setTaxId(EmptyParam taxId) { + this.taxId = taxId; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address build() { + return new PaymentIntentUpdateParams.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; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.Blik build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 + @EqualsAndHashCode(callSuper = false) + 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") + Object taxId; + + private Boleto(Map extraParams, Object taxId) { + this.extraParams = extraParams; + this.taxId = taxId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object taxId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Boleto build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Boleto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * 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; + } + + /** + * Required. The tax ID of the customer (CPF for individual consumers or + * CNPJ for businesses consumers) + */ + public Builder setTaxId(EmptyParam taxId) { + this.taxId = taxId; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.Cashapp build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Crypto(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 PaymentIntentUpdateParams.PaymentMethodData.Crypto build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Crypto#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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.CustomerBalance build() { + return new PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.Eps build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Eps(this.bank, this.extraParams); + } + + /** The customer's bank. */ + public Builder setBank(PaymentIntentUpdateParams.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 PaymentIntentUpdateParams.PaymentMethodData.Eps#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Eps#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("arzte_und_apotheker_bank") + ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"), + + @SerializedName("austrian_anadi_bank_ag") + AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"), + + @SerializedName("bank_austria") + BANK_AUSTRIA("bank_austria"), + + @SerializedName("bankhaus_carl_spangler") + BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), + + @SerializedName("bankhaus_schelhammer_und_schattera_ag") + BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), + + @SerializedName("bawag_psk_ag") + BAWAG_PSK_AG("bawag_psk_ag"), + + @SerializedName("bks_bank_ag") + BKS_BANK_AG("bks_bank_ag"), + + @SerializedName("brull_kallmus_bank_ag") + BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), + + @SerializedName("btv_vier_lander_bank") + BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), + + @SerializedName("capital_bank_grawe_gruppe_ag") + CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), + + @SerializedName("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 + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.PaymentMethodData.Fpx build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Fpx( + this.accountHolderType, this.bank, this.extraParams); + } + + /** Account holder type for FPX transaction. */ + public Builder setAccountHolderType( + PaymentIntentUpdateParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { + this.accountHolderType = accountHolderType; + return this; + } + + /** Required. The customer's bank. */ + public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.Fpx.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Fpx#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Fpx#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AccountHolderType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("individual") + INDIVIDUAL("individual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountHolderType(String value) { + this.value = value; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("affin_bank") + AFFIN_BANK("affin_bank"), + + @SerializedName("agrobank") + AGROBANK("agrobank"), + + @SerializedName("alliance_bank") + ALLIANCE_BANK("alliance_bank"), + + @SerializedName("ambank") + AMBANK("ambank"), + + @SerializedName("bank_islam") + BANK_ISLAM("bank_islam"), + + @SerializedName("bank_muamalat") + BANK_MUAMALAT("bank_muamalat"), + + @SerializedName("bank_of_china") + BANK_OF_CHINA("bank_of_china"), + + @SerializedName("bank_rakyat") + BANK_RAKYAT("bank_rakyat"), + + @SerializedName("bsn") + BSN("bsn"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("deutsche_bank") + DEUTSCHE_BANK("deutsche_bank"), + + @SerializedName("hong_leong_bank") + HONG_LEONG_BANK("hong_leong_bank"), + + @SerializedName("hsbc") + HSBC("hsbc"), + + @SerializedName("kfh") + KFH("kfh"), + + @SerializedName("maybank2e") + MAYBANK2E("maybank2e"), + + @SerializedName("maybank2u") + MAYBANK2U("maybank2u"), + + @SerializedName("ocbc") + OCBC("ocbc"), + + @SerializedName("pb_enterprise") + PB_ENTERPRISE("pb_enterprise"), + + @SerializedName("public_bank") + PUBLIC_BANK("public_bank"), + + @SerializedName("rhb") + RHB("rhb"), + + @SerializedName("standard_chartered") + STANDARD_CHARTERED("standard_chartered"), + + @SerializedName("uob") + UOB("uob"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Giropay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Giropay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Giropay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Giropay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Giropay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Giropay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Gopay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Gopay(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 PaymentIntentUpdateParams.PaymentMethodData.Gopay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Gopay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Gopay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Gopay#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 + @EqualsAndHashCode(callSuper = false) + public static class Grabpay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Grabpay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Grabpay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Grabpay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Grabpay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Grabpay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer build() { + return new PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank( + PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ideal { + /** + * The customer's bank. Only use this parameter for existing customers. Don't use it for new + * customers. + */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Ideal(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Ideal build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Ideal(this.bank, this.extraParams); + } + + /** + * The customer's bank. Only use this parameter for existing customers. Don't use it for new + * customers. + */ + public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.Ideal.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Ideal#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Ideal#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("abn_amro") + ABN_AMRO("abn_amro"), + + @SerializedName("asn_bank") + ASN_BANK("asn_bank"), + + @SerializedName("bunq") + BUNQ("bunq"), + + @SerializedName("buut") + BUUT("buut"), + + @SerializedName("handelsbanken") + HANDELSBANKEN("handelsbanken"), + + @SerializedName("ing") + ING("ing"), + + @SerializedName("knab") + KNAB("knab"), + + @SerializedName("moneyou") + MONEYOU("moneyou"), + + @SerializedName("n26") + N26("n26"), + + @SerializedName("nn") + NN("nn"), + + @SerializedName("rabobank") + RABOBANK("rabobank"), + + @SerializedName("regiobank") + REGIOBANK("regiobank"), + + @SerializedName("revolut") + REVOLUT("revolut"), + + @SerializedName("sns_bank") + SNS_BANK("sns_bank"), + + @SerializedName("triodos_bank") + TRIODOS_BANK("triodos_bank"), + + @SerializedName("van_lanschot") + VAN_LANSCHOT("van_lanschot"), + + @SerializedName("yoursafe") + YOURSAFE("yoursafe"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InteracPresent { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private InteracPresent(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.InteracPresent build() { + return new PaymentIntentUpdateParams.PaymentMethodData.InteracPresent(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.InteracPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.InteracPresent#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private KakaoPay(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 PaymentIntentUpdateParams.PaymentMethodData.KakaoPay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.KakaoPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.KakaoPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.KakaoPay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Klarna { + /** Customer's date of birth. */ + @SerializedName("dob") + Dob dob; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Klarna(Dob dob, Map extraParams) { + this.dob = dob; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Dob dob; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Klarna build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Klarna(this.dob, this.extraParams); + } + + /** Customer's date of birth. */ + public Builder setDob(PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob dob) { + this.dob = dob; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Dob { + /** Required. The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of birth. */ + @SerializedName("year") + Long year; + + private Dob(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Konbini { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Konbini(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Konbini build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Konbini(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Konbini#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Konbini#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KrCard { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private KrCard(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 PaymentIntentUpdateParams.PaymentMethodData.KrCard build() { + return new PaymentIntentUpdateParams.PaymentMethodData.KrCard(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.KrCard#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.KrCard#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Link { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Link(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Link build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Link(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Link#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Link#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.MbWay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Mobilepay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Mobilepay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Mobilepay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Mobilepay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Mobilepay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Multibanco { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Multibanco(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Multibanco build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Multibanco(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Multibanco#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Multibanco#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NaverPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this + * defaults to {@code card}. + */ + @SerializedName("funding") + Funding funding; + + private NaverPay(Map extraParams, Funding funding) { + this.extraParams = extraParams; + this.funding = funding; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Funding funding; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.NaverPay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.NaverPay( + this.extraParams, this.funding); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.NaverPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.NaverPay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this + * defaults to {@code card}. + */ + public Builder setFunding( + PaymentIntentUpdateParams.PaymentMethodData.NaverPay.Funding funding) { + this.funding = funding; + return this; + } + } + + public enum Funding implements ApiRequestParams.EnumParam { + @SerializedName("card") + CARD("card"), + + @SerializedName("points") + POINTS("points"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Funding(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NzBankAccount { + /** + * The name on the bank account. Only required if the account holder name is different from + * the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ + @SerializedName("account_holder_name") + Object accountHolderName; + + /** Required. The account number for the bank account. */ + @SerializedName("account_number") + Object accountNumber; + + /** Required. The numeric code for the bank account's bank. */ + @SerializedName("bank_code") + Object bankCode; + + /** Required. The numeric code for the bank account's bank branch. */ + @SerializedName("branch_code") + Object branchCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + @SerializedName("reference") + Object reference; + + /** Required. The suffix of the bank account number. */ + @SerializedName("suffix") + Object suffix; + + private NzBankAccount( + Object accountHolderName, + Object accountNumber, + Object bankCode, + Object branchCode, + Map extraParams, + Object reference, + Object suffix) { + this.accountHolderName = accountHolderName; + this.accountNumber = accountNumber; + this.bankCode = bankCode; + this.branchCode = branchCode; + this.extraParams = extraParams; + this.reference = reference; + this.suffix = suffix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountHolderName; - /** - * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA - * debit bank account. - */ - @SerializedName("sepa_debit") - SepaDebit sepaDebit; + private Object accountNumber; - /** - * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment - * method. - */ - @SerializedName("shopeepay") - Shopeepay shopeepay; + private Object bankCode; - /** - * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT - * payment method. - */ - @SerializedName("sofort") - Sofort sofort; + private Object branchCode; - /** This hash contains details about the Stripe balance payment method. */ - @SerializedName("stripe_balance") - StripeBalance stripeBalance; + private Map extraParams; - /** - * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment - * method. - */ - @SerializedName("swish") - Swish swish; + private Object reference; - /** - * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - */ - @SerializedName("twint") - Twint twint; + private Object suffix; - /** - * 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; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount build() { + return new PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount( + this.accountHolderName, + this.accountNumber, + this.bankCode, + this.branchCode, + this.extraParams, + this.reference, + this.suffix); + } - /** - * 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; + /** + * The name on the bank account. Only required if the account holder name is different from + * the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ + public Builder setAccountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } - /** - * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the - * wechat_pay payment method. - */ - @SerializedName("wechat_pay") - WechatPay wechatPay; + /** + * The name on the bank account. Only required if the account holder name is different from + * the name of the authorized signatory collected in the PaymentMethod’s billing details. + */ + public Builder setAccountHolderName(EmptyParam accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } - /** - * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment - * method. - */ - @SerializedName("zip") - Zip zip; + /** Required. The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } - private PaymentMethodData( - AcssDebit acssDebit, - Affirm affirm, - AfterpayClearpay afterpayClearpay, - Alipay alipay, - AllowRedisplay allowRedisplay, - Alma alma, - AmazonPay amazonPay, - AuBecsDebit auBecsDebit, - BacsDebit bacsDebit, - Bancontact bancontact, - Billie billie, - BillingDetails billingDetails, - Blik blik, - Boleto boleto, - Cashapp cashapp, - Crypto crypto, - CustomerBalance customerBalance, - Eps eps, - Map extraParams, - Fpx fpx, - Giropay giropay, - Gopay gopay, - Grabpay grabpay, - IdBankTransfer idBankTransfer, - Ideal ideal, - InteracPresent interacPresent, - KakaoPay kakaoPay, - Klarna klarna, - Konbini konbini, - KrCard krCard, - Link link, - MbWay mbWay, - Map metadata, - Mobilepay mobilepay, - Multibanco multibanco, - NaverPay naverPay, - NzBankAccount nzBankAccount, - Oxxo oxxo, - P24 p24, - PayByBank payByBank, - Payco payco, - Paynow paynow, - Paypal paypal, - Paypay paypay, - Payto payto, - Pix pix, - Promptpay promptpay, - Qris qris, - RadarOptions radarOptions, - Rechnung rechnung, - RevolutPay revolutPay, - SamsungPay samsungPay, - Satispay satispay, - SepaDebit sepaDebit, - Shopeepay shopeepay, - Sofort sofort, - StripeBalance stripeBalance, - 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.alma = alma; - this.amazonPay = amazonPay; - this.auBecsDebit = auBecsDebit; - this.bacsDebit = bacsDebit; - this.bancontact = bancontact; - this.billie = billie; - this.billingDetails = billingDetails; - this.blik = blik; - this.boleto = boleto; - this.cashapp = cashapp; - this.crypto = crypto; - this.customerBalance = customerBalance; - this.eps = eps; - this.extraParams = extraParams; - this.fpx = fpx; - this.giropay = giropay; - this.gopay = gopay; - this.grabpay = grabpay; - this.idBankTransfer = idBankTransfer; - this.ideal = ideal; - this.interacPresent = interacPresent; - this.kakaoPay = kakaoPay; - this.klarna = klarna; - this.konbini = konbini; - this.krCard = krCard; - this.link = link; - this.mbWay = mbWay; - this.metadata = metadata; - this.mobilepay = mobilepay; - this.multibanco = multibanco; - this.naverPay = naverPay; - this.nzBankAccount = nzBankAccount; - this.oxxo = oxxo; - this.p24 = p24; - this.payByBank = payByBank; - this.payco = payco; - this.paynow = paynow; - this.paypal = paypal; - this.paypay = paypay; - this.payto = payto; - this.pix = pix; - this.promptpay = promptpay; - this.qris = qris; - this.radarOptions = radarOptions; - this.rechnung = rechnung; - this.revolutPay = revolutPay; - this.samsungPay = samsungPay; - this.satispay = satispay; - this.sepaDebit = sepaDebit; - this.shopeepay = shopeepay; - this.sofort = sofort; - this.stripeBalance = stripeBalance; - this.swish = swish; - this.twint = twint; - this.type = type; - this.usBankAccount = usBankAccount; - this.wechatPay = wechatPay; - this.zip = zip; - } + /** Required. The account number for the bank account. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Required. The numeric code for the bank account's bank. */ + public Builder setBankCode(String bankCode) { + this.bankCode = bankCode; + return this; + } + + /** Required. The numeric code for the bank account's bank. */ + public Builder setBankCode(EmptyParam bankCode) { + this.bankCode = bankCode; + return this; + } + + /** Required. The numeric code for the bank account's bank branch. */ + public Builder setBranchCode(String branchCode) { + this.branchCode = branchCode; + return this; + } + + /** Required. The numeric code for the bank account's bank branch. */ + public Builder setBranchCode(EmptyParam branchCode) { + this.branchCode = branchCode; + return this; + } - public static Builder builder() { - return new Builder(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + + /** Required. The suffix of the bank account number. */ + public Builder setSuffix(String suffix) { + this.suffix = suffix; + return this; + } + + /** Required. The suffix of the bank account number. */ + public Builder setSuffix(EmptyParam suffix) { + this.suffix = suffix; + return this; + } + } } - public static class Builder { - private AcssDebit acssDebit; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Oxxo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Affirm affirm; + private Oxxo(Map extraParams) { + this.extraParams = extraParams; + } - private AfterpayClearpay afterpayClearpay; + public static Builder builder() { + return new Builder(); + } - private Alipay alipay; + public static class Builder { + private Map extraParams; - private AllowRedisplay allowRedisplay; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Oxxo build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Oxxo(this.extraParams); + } - private Alma alma; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Oxxo#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private AmazonPay amazonPay; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Oxxo#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - private AuBecsDebit auBecsDebit; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class P24 { + /** The customer's bank. */ + @SerializedName("bank") + Bank bank; - private BacsDebit bacsDebit; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Bancontact bancontact; + private P24(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } - private Billie billie; + public static Builder builder() { + return new Builder(); + } - private BillingDetails billingDetails; + public static class Builder { + private Bank bank; - private Blik blik; + private Map extraParams; - private Boleto boleto; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.P24 build() { + return new PaymentIntentUpdateParams.PaymentMethodData.P24(this.bank, this.extraParams); + } - private Cashapp cashapp; + /** The customer's bank. */ + public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.P24.Bank bank) { + this.bank = bank; + return this; + } - private Crypto crypto; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.P24#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private CustomerBalance customerBalance; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.P24#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - private Eps eps; + public enum Bank implements ApiRequestParams.EnumParam { + @SerializedName("alior_bank") + ALIOR_BANK("alior_bank"), - private Map extraParams; + @SerializedName("bank_millennium") + BANK_MILLENNIUM("bank_millennium"), - private Fpx fpx; + @SerializedName("bank_nowy_bfg_sa") + BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), - private Giropay giropay; + @SerializedName("bank_pekao_sa") + BANK_PEKAO_SA("bank_pekao_sa"), - private Gopay gopay; + @SerializedName("banki_spbdzielcze") + BANKI_SPBDZIELCZE("banki_spbdzielcze"), - private Grabpay grabpay; + @SerializedName("blik") + BLIK("blik"), - private IdBankTransfer idBankTransfer; + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), - private Ideal ideal; + @SerializedName("boz") + BOZ("boz"), - private InteracPresent interacPresent; + @SerializedName("citi_handlowy") + CITI_HANDLOWY("citi_handlowy"), - private KakaoPay kakaoPay; + @SerializedName("credit_agricole") + CREDIT_AGRICOLE("credit_agricole"), - private Klarna klarna; + @SerializedName("envelobank") + ENVELOBANK("envelobank"), - private Konbini konbini; + @SerializedName("etransfer_pocztowy24") + ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), - private KrCard krCard; + @SerializedName("getin_bank") + GETIN_BANK("getin_bank"), - private Link link; + @SerializedName("ideabank") + IDEABANK("ideabank"), - private MbWay mbWay; + @SerializedName("ing") + ING("ing"), - private Map metadata; + @SerializedName("inteligo") + INTELIGO("inteligo"), - private Mobilepay mobilepay; + @SerializedName("mbank_mtransfer") + MBANK_MTRANSFER("mbank_mtransfer"), - private Multibanco multibanco; + @SerializedName("nest_przelew") + NEST_PRZELEW("nest_przelew"), - private NaverPay naverPay; + @SerializedName("noble_pay") + NOBLE_PAY("noble_pay"), - private NzBankAccount nzBankAccount; + @SerializedName("pbac_z_ipko") + PBAC_Z_IPKO("pbac_z_ipko"), - private Oxxo oxxo; + @SerializedName("plus_bank") + PLUS_BANK("plus_bank"), - private P24 p24; + @SerializedName("santander_przelew24") + SANTANDER_PRZELEW24("santander_przelew24"), - private PayByBank payByBank; + @SerializedName("tmobile_usbugi_bankowe") + TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), + + @SerializedName("toyota_bank") + TOYOTA_BANK("toyota_bank"), - private Payco payco; + @SerializedName("velobank") + VELOBANK("velobank"), - private Paynow paynow; + @SerializedName("volkswagen_bank") + VOLKSWAGEN_BANK("volkswagen_bank"); - private Paypal paypal; + @Getter(onMethod_ = {@Override}) + private final String value; - private Paypay paypay; + Bank(String value) { + this.value = value; + } + } + } - private Payto payto; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Pix pix; + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } - private Promptpay promptpay; + public static Builder builder() { + return new Builder(); + } - private Qris qris; + public static class Builder { + private Map extraParams; - private RadarOptions radarOptions; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentUpdateParams.PaymentMethodData.PayByBank(this.extraParams); + } - private Rechnung rechnung; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private RevolutPay revolutPay; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - private SamsungPay samsungPay; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payco { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Satispay satispay; + private Payco(Map extraParams) { + this.extraParams = extraParams; + } - private SepaDebit sepaDebit; + public static Builder builder() { + return new Builder(); + } - private Shopeepay shopeepay; + public static class Builder { + private Map extraParams; - private Sofort sofort; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Payco build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Payco(this.extraParams); + } - private StripeBalance stripeBalance; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payco#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Swish swish; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payco#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - private Twint twint; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paynow { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Type type; + private Paynow(Map extraParams) { + this.extraParams = extraParams; + } - private UsBankAccount usBankAccount; + public static Builder builder() { + return new Builder(); + } - private WechatPay wechatPay; + public static class Builder { + private Map extraParams; - private Zip zip; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Paynow build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Paynow(this.extraParams); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData build() { - return new PaymentIntentUpdateParams.PaymentMethodData( - this.acssDebit, - this.affirm, - this.afterpayClearpay, - this.alipay, - this.allowRedisplay, - this.alma, - this.amazonPay, - this.auBecsDebit, - this.bacsDebit, - this.bancontact, - this.billie, - this.billingDetails, - this.blik, - this.boleto, - this.cashapp, - this.crypto, - this.customerBalance, - this.eps, - this.extraParams, - this.fpx, - this.giropay, - this.gopay, - this.grabpay, - this.idBankTransfer, - this.ideal, - this.interacPresent, - this.kakaoPay, - this.klarna, - this.konbini, - this.krCard, - this.link, - this.mbWay, - this.metadata, - this.mobilepay, - this.multibanco, - this.naverPay, - this.nzBankAccount, - this.oxxo, - this.p24, - this.payByBank, - this.payco, - this.paynow, - this.paypal, - this.paypay, - this.payto, - this.pix, - this.promptpay, - this.qris, - this.radarOptions, - this.rechnung, - this.revolutPay, - this.samsungPay, - this.satispay, - this.sepaDebit, - this.shopeepay, - this.sofort, - this.stripeBalance, - this.swish, - this.twint, - this.type, - this.usBankAccount, - this.wechatPay, - this.zip); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paynow#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS - * Debit payment method. - */ - public Builder setAcssDebit(PaymentIntentUpdateParams.PaymentMethodData.AcssDebit acssDebit) { - this.acssDebit = acssDebit; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paynow#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { /** - * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm - * payment method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setAffirm(PaymentIntentUpdateParams.PaymentMethodData.Affirm affirm) { - this.affirm = affirm; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the - * AfterpayClearpay payment method. - */ - public Builder setAfterpayClearpay( - PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; - return this; + private Paypal(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay - * payment method. - */ - public Builder setAlipay(PaymentIntentUpdateParams.PaymentMethodData.Alipay alipay) { - this.alipay = alipay; - return this; + public static Builder builder() { + return new Builder(); } - /** - * 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( - PaymentIntentUpdateParams.PaymentMethodData.AllowRedisplay allowRedisplay) { - this.allowRedisplay = allowRedisplay; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - */ - public Builder setAlma(PaymentIntentUpdateParams.PaymentMethodData.Alma alma) { - this.alma = alma; - return this; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Paypal build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Paypal(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypal#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypal#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { /** - * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay - * payment method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setAmazonPay(PaymentIntentUpdateParams.PaymentMethodData.AmazonPay amazonPay) { - this.amazonPay = amazonPay; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the - * bank account. - */ - public Builder setAuBecsDebit( - PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit auBecsDebit) { - this.auBecsDebit = auBecsDebit; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs - * Direct Debit bank account. - */ - public Builder setBacsDebit(PaymentIntentUpdateParams.PaymentMethodData.BacsDebit bacsDebit) { - this.bacsDebit = bacsDebit; - return this; + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Paypay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypay#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 + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + Object accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + Object bsbNumber; /** - * If this is a {@code bancontact} PaymentMethod, this hash contains details about the - * Bancontact payment method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setBancontact( - PaymentIntentUpdateParams.PaymentMethodData.Bancontact bancontact) { - this.bancontact = bancontact; - return this; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + Object payId; + + private Payto( + Object accountNumber, Object bsbNumber, Map extraParams, Object payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; } - /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * payment method. - */ - public Builder setBillie(PaymentIntentUpdateParams.PaymentMethodData.Billie billie) { - this.billie = billie; - return this; + public static Builder builder() { + return new Builder(); } - /** - * Billing information associated with the PaymentMethod that may be used or required by - * particular types of payment methods. - */ - public Builder setBillingDetails( - PaymentIntentUpdateParams.PaymentMethodData.BillingDetails billingDetails) { - this.billingDetails = billingDetails; - return this; - } + public static class Builder { + private Object accountNumber; + + private Object bsbNumber; + + private Map extraParams; + + private Object payId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Payto build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(EmptyParam bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment - * method. - */ - public Builder setBlik(PaymentIntentUpdateParams.PaymentMethodData.Blik blik) { - this.blik = blik; - return this; - } + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } - /** - * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto - * payment method. - */ - public Builder setBoleto(PaymentIntentUpdateParams.PaymentMethodData.Boleto boleto) { - this.boleto = boleto; - return this; + /** The PayID alias for the bank account. */ + public Builder setPayId(EmptyParam payId) { + this.payId = payId; + return this; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { /** - * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App - * Pay payment method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setCashapp(PaymentIntentUpdateParams.PaymentMethodData.Cashapp cashapp) { - this.cashapp = cashapp; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment - * method. - */ - public Builder setCrypto(PaymentIntentUpdateParams.PaymentMethodData.Crypto crypto) { - this.crypto = crypto; - return this; + private Pix(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the - * CustomerBalance payment method. - */ - public Builder setCustomerBalance( - PaymentIntentUpdateParams.PaymentMethodData.CustomerBalance customerBalance) { - this.customerBalance = customerBalance; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment - * method. - */ - public Builder setEps(PaymentIntentUpdateParams.PaymentMethodData.Eps eps) { - this.eps = eps; - return this; - } + public static class Builder { + private Map extraParams; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodData#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Pix build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Pix(this.extraParams); } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentIntentUpdateParams.PaymentMethodData#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; } - 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(PaymentIntentUpdateParams.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(PaymentIntentUpdateParams.PaymentMethodData.Giropay giropay) { - this.giropay = giropay; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Promptpay { /** - * If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment - * method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setGopay(PaymentIntentUpdateParams.PaymentMethodData.Gopay gopay) { - this.gopay = gopay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay - * payment method. - */ - public Builder setGrabpay(PaymentIntentUpdateParams.PaymentMethodData.Grabpay grabpay) { - this.grabpay = grabpay; - return this; + private Promptpay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the - * IdBankTransfer payment method. - */ - public Builder setIdBankTransfer( - PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { - this.idBankTransfer = idBankTransfer; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL - * payment method. - */ - public Builder setIdeal(PaymentIntentUpdateParams.PaymentMethodData.Ideal ideal) { - this.ideal = ideal; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is an {@code interac_present} PaymentMethod, this hash contains details about the - * Interac Present payment method. - */ - public Builder setInteracPresent( - PaymentIntentUpdateParams.PaymentMethodData.InteracPresent interacPresent) { - this.interacPresent = interacPresent; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Promptpay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Promptpay(this.extraParams); + } - /** - * If this is a {@code kakao_pay} PaymentMethod, this hash contains details about the Kakao - * Pay payment method. - */ - public Builder setKakaoPay(PaymentIntentUpdateParams.PaymentMethodData.KakaoPay kakaoPay) { - this.kakaoPay = kakaoPay; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Promptpay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna - * payment method. - */ - public Builder setKlarna(PaymentIntentUpdateParams.PaymentMethodData.Klarna klarna) { - this.klarna = klarna; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Promptpay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Qris { /** - * If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini - * payment method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setKonbini(PaymentIntentUpdateParams.PaymentMethodData.Konbini konbini) { - this.konbini = konbini; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code kr_card} PaymentMethod, this hash contains details about the Korean - * Card payment method. - */ - public Builder setKrCard(PaymentIntentUpdateParams.PaymentMethodData.KrCard krCard) { - this.krCard = krCard; - return this; + private Qris(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - public Builder setLink(PaymentIntentUpdateParams.PaymentMethodData.Link link) { - this.link = link; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment - * method. - */ - public Builder setMbWay(PaymentIntentUpdateParams.PaymentMethodData.MbWay mbWay) { - this.mbWay = mbWay; - return this; - } + public static class Builder { + private Map extraParams; - /** - * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodData#metadata} for the field documentation. - */ - public Builder putMetadata(String key, String value) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Qris build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Qris(this.extraParams); } - this.metadata.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `metadata` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentIntentUpdateParams.PaymentMethodData#metadata} for the field - * documentation. - */ - public Builder putAllMetadata(Map map) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Qris#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; } - 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(PaymentIntentUpdateParams.PaymentMethodData.Mobilepay mobilepay) { - this.mobilepay = mobilepay; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Qris#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 + @EqualsAndHashCode(callSuper = false) + public static class RadarOptions { /** - * If this is a {@code multibanco} PaymentMethod, this hash contains details about the - * Multibanco payment method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setMultibanco( - PaymentIntentUpdateParams.PaymentMethodData.Multibanco multibanco) { - this.multibanco = multibanco; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code naver_pay} PaymentMethod, this hash contains details about the Naver - * Pay payment method. + * A Radar Session is a snapshot of + * the browser metadata and device details that help Radar make more accurate predictions on + * your payments. */ - public Builder setNaverPay(PaymentIntentUpdateParams.PaymentMethodData.NaverPay naverPay) { - this.naverPay = naverPay; - return this; - } + @SerializedName("session") + Object session; - /** - * If this is an nz_bank_account PaymentMethod, this hash contains details about the - * nz_bank_account payment method. - */ - public Builder setNzBankAccount( - PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; + private RadarOptions(Map extraParams, Object session) { + this.extraParams = extraParams; + this.session = session; } - /** - * If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment - * method. - */ - public Builder setOxxo(PaymentIntentUpdateParams.PaymentMethodData.Oxxo oxxo) { - this.oxxo = oxxo; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment - * method. - */ - public Builder setP24(PaymentIntentUpdateParams.PaymentMethodData.P24 p24) { - this.p24 = p24; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. - */ - public Builder setPayByBank(PaymentIntentUpdateParams.PaymentMethodData.PayByBank payByBank) { - this.payByBank = payByBank; - return this; - } + private Object session; - /** - * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO - * payment method. - */ - public Builder setPayco(PaymentIntentUpdateParams.PaymentMethodData.Payco payco) { - this.payco = payco; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.RadarOptions build() { + return new PaymentIntentUpdateParams.PaymentMethodData.RadarOptions( + this.extraParams, this.session); + } - /** - * If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow - * payment method. - */ - public Builder setPaynow(PaymentIntentUpdateParams.PaymentMethodData.Paynow paynow) { - this.paynow = paynow; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.RadarOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal - * payment method. - */ - public Builder setPaypal(PaymentIntentUpdateParams.PaymentMethodData.Paypal paypal) { - this.paypal = paypal; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.RadarOptions#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay - * payment method. - */ - public Builder setPaypay(PaymentIntentUpdateParams.PaymentMethodData.Paypay paypay) { - this.paypay = paypay; - return this; - } + /** + * A Radar Session is a snapshot + * of the browser metadata and device details that help Radar make more accurate predictions + * on your payments. + */ + public Builder setSession(String session) { + this.session = session; + return this; + } - /** - * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo - * payment method. - */ - public Builder setPayto(PaymentIntentUpdateParams.PaymentMethodData.Payto payto) { - this.payto = payto; - return this; + /** + * A Radar Session is a snapshot + * of the browser metadata and device details that help Radar make more accurate predictions + * on your payments. + */ + public Builder setSession(EmptyParam session) { + this.session = session; + return this; + } } + } - /** - * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment - * method. - */ - public Builder setPix(PaymentIntentUpdateParams.PaymentMethodData.Pix pix) { - this.pix = pix; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rechnung { + /** Required. Customer's date of birth */ + @SerializedName("dob") + Dob dob; /** - * If this is a {@code promptpay} PaymentMethod, this hash contains details about the - * PromptPay payment method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setPromptpay(PaymentIntentUpdateParams.PaymentMethodData.Promptpay promptpay) { - this.promptpay = promptpay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code qris} PaymentMethod, this hash contains details about the QRIS payment - * method. - */ - public Builder setQris(PaymentIntentUpdateParams.PaymentMethodData.Qris qris) { - this.qris = qris; - return this; + private Rechnung(Dob dob, Map extraParams) { + this.dob = dob; + this.extraParams = extraParams; } - /** - * Options to configure Radar. See Radar - * Session for more information. - */ - public Builder setRadarOptions( - PaymentIntentUpdateParams.PaymentMethodData.RadarOptions radarOptions) { - this.radarOptions = radarOptions; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung - * payment method. - */ - public Builder setRechnung(PaymentIntentUpdateParams.PaymentMethodData.Rechnung rechnung) { - this.rechnung = rechnung; - return this; - } + public static class Builder { + private Dob dob; - /** - * If this is a {@code revolut_pay} PaymentMethod, this hash contains details about the - * Revolut Pay payment method. - */ - public Builder setRevolutPay( - PaymentIntentUpdateParams.PaymentMethodData.RevolutPay revolutPay) { - this.revolutPay = revolutPay; - return this; - } + private Map extraParams; - /** - * If this is a {@code samsung_pay} PaymentMethod, this hash contains details about the - * SamsungPay payment method. - */ - public Builder setSamsungPay( - PaymentIntentUpdateParams.PaymentMethodData.SamsungPay samsungPay) { - this.samsungPay = samsungPay; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Rechnung build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Rechnung( + this.dob, this.extraParams); + } - /** - * If this is a {@code satispay} PaymentMethod, this hash contains details about the Satispay - * payment method. - */ - public Builder setSatispay(PaymentIntentUpdateParams.PaymentMethodData.Satispay satispay) { - this.satispay = satispay; - return this; - } + /** Required. Customer's date of birth */ + public Builder setDob(PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob dob) { + this.dob = dob; + return this; + } - /** - * If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA - * debit bank account. - */ - public Builder setSepaDebit(PaymentIntentUpdateParams.PaymentMethodData.SepaDebit sepaDebit) { - this.sepaDebit = sepaDebit; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Rechnung#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay - * payment method. - */ - public Builder setShopeepay(PaymentIntentUpdateParams.PaymentMethodData.Shopeepay shopeepay) { - this.shopeepay = shopeepay; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Rechnung#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } - /** - * If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT - * payment method. - */ - public Builder setSofort(PaymentIntentUpdateParams.PaymentMethodData.Sofort sofort) { - this.sofort = sofort; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Dob { + /** Required. The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; - /** This hash contains details about the Stripe balance payment method. */ - public Builder setStripeBalance( - PaymentIntentUpdateParams.PaymentMethodData.StripeBalance stripeBalance) { - this.stripeBalance = stripeBalance; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code swish} PaymentMethod, this hash contains details about the Swish - * payment method. - */ - public Builder setSwish(PaymentIntentUpdateParams.PaymentMethodData.Swish swish) { - this.swish = swish; - return this; + /** Required. The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of birth. */ + @SerializedName("year") + Long year; + + private Dob(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay { /** - * If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment - * method. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setTwint(PaymentIntentUpdateParams.PaymentMethodData.Twint twint) { - this.twint = twint; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * 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(PaymentIntentUpdateParams.PaymentMethodData.Type type) { - this.type = type; - return this; + private RevolutPay(Map extraParams) { + this.extraParams = extraParams; } - /** - * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the - * US bank account payment method. - */ - public Builder setUsBankAccount( - PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount usBankAccount) { - this.usBankAccount = usBankAccount; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the - * wechat_pay payment method. - */ - public Builder setWechatPay(PaymentIntentUpdateParams.PaymentMethodData.WechatPay wechatPay) { - this.wechatPay = wechatPay; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment - * method. - */ - public Builder setZip(PaymentIntentUpdateParams.PaymentMethodData.Zip zip) { - this.zip = zip; - return this; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.RevolutPay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.RevolutPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.RevolutPay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.RevolutPay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class AcssDebit { - /** Required. Customer's bank account number. */ - @SerializedName("account_number") - Object accountNumber; - + public static class SamsungPay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9199,23 +20045,8 @@ public static class AcssDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Institution number of the customer's bank. */ - @SerializedName("institution_number") - Object institutionNumber; - - /** Required. Transit number of the customer's bank. */ - @SerializedName("transit_number") - Object transitNumber; - - private AcssDebit( - Object accountNumber, - Map extraParams, - Object institutionNumber, - Object transitNumber) { - this.accountNumber = accountNumber; + private SamsungPay(Map extraParams) { this.extraParams = extraParams; - this.institutionNumber = institutionNumber; - this.transitNumber = transitNumber; } public static Builder builder() { @@ -9223,36 +20054,17 @@ public static Builder builder() { } public static class Builder { - private Object accountNumber; - private Map extraParams; - private Object institutionNumber; - - private Object transitNumber; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.AcssDebit build() { - return new PaymentIntentUpdateParams.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; - } - - /** Required. Customer's bank account number. */ - public Builder setAccountNumber(EmptyParam accountNumber) { - this.accountNumber = accountNumber; - return this; + public PaymentIntentUpdateParams.PaymentMethodData.SamsungPay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.SamsungPay(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AcssDebit#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.SamsungPay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9266,7 +20078,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AcssDebit#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.SamsungPay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9276,28 +20088,62 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + } + } - /** Required. Institution number of the customer's bank. */ - public Builder setInstitutionNumber(String institutionNumber) { - this.institutionNumber = institutionNumber; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Satispay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. */ - public Builder setInstitutionNumber(EmptyParam institutionNumber) { - this.institutionNumber = institutionNumber; - return this; + private Satispay(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 PaymentIntentUpdateParams.PaymentMethodData.Satispay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Satispay(this.extraParams); } - /** Required. Transit number of the customer's bank. */ - public Builder setTransitNumber(String transitNumber) { - this.transitNumber = transitNumber; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Satispay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } - /** Required. Transit number of the customer's bank. */ - public Builder setTransitNumber(EmptyParam transitNumber) { - this.transitNumber = transitNumber; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Satispay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } } @@ -9305,7 +20151,7 @@ public Builder setTransitNumber(EmptyParam transitNumber) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Affirm { + public static class SepaDebit { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9315,8 +20161,13 @@ public static class Affirm { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Affirm(Map extraParams) { + /** Required. IBAN of the bank account. */ + @SerializedName("iban") + Object iban; + + private SepaDebit(Map extraParams, Object iban) { this.extraParams = extraParams; + this.iban = iban; } public static Builder builder() { @@ -9326,16 +20177,19 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object iban; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Affirm build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Affirm(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodData.SepaDebit build() { + return new PaymentIntentUpdateParams.PaymentMethodData.SepaDebit( + this.extraParams, this.iban); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Affirm#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.SepaDebit#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9348,8 +20202,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Affirm#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.SepaDebit#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9358,12 +20212,24 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Required. IBAN of the bank account. */ + public Builder setIban(String iban) { + this.iban = iban; + return this; + } + + /** Required. IBAN of the bank account. */ + public Builder setIban(EmptyParam iban) { + this.iban = iban; + return this; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class AfterpayClearpay { + public static class Shopeepay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9373,7 +20239,7 @@ public static class AfterpayClearpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AfterpayClearpay(Map extraParams) { + private Shopeepay(Map extraParams) { this.extraParams = extraParams; } @@ -9385,15 +20251,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodData.Shopeepay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Shopeepay(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Shopeepay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9406,8 +20272,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Shopeepay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9419,9 +20285,16 @@ public Builder putAllExtraParam(Map map) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Alipay { + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Sofort { + /** + * Required. Two-letter ISO code representing the country the bank account is + * located in. + */ + @SerializedName("country") + Country country; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9431,7 +20304,8 @@ public static class Alipay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alipay(Map extraParams) { + private Sofort(Country country, Map extraParams) { + this.country = country; this.extraParams = extraParams; } @@ -9440,17 +20314,30 @@ public static Builder builder() { } public static class Builder { + private Country country; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Alipay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Alipay(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodData.Sofort build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Sofort( + this.country, this.extraParams); + } + + /** + * Required. Two-letter ISO code representing the country the bank account + * is located in. + */ + public Builder setCountry( + PaymentIntentUpdateParams.PaymentMethodData.Sofort.Country country) { + this.country = country; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alipay#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Sofort#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9464,7 +20351,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alipay#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Sofort#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9475,11 +20362,42 @@ public Builder putAllExtraParam(Map map) { return this; } } + + public enum Country implements ApiRequestParams.EnumParam { + @SerializedName("AT") + AT("AT"), + + @SerializedName("BE") + BE("BE"), + + @SerializedName("DE") + DE("DE"), + + @SerializedName("ES") + ES("ES"), + + @SerializedName("IT") + IT("IT"), + + @SerializedName("NL") + NL("NL"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Country(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Alma { + public static class StripeBalance { + /** The connected account ID whose Stripe balance to use as the source of payment. */ + @SerializedName("account") + Object account; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9489,8 +20407,19 @@ public static class Alma { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Alma(Map extraParams) { + /** + * The source_type + * of the balance + */ + @SerializedName("source_type") + SourceType sourceType; + + private StripeBalance( + Object account, Map extraParams, SourceType sourceType) { + this.account = account; this.extraParams = extraParams; + this.sourceType = sourceType; } public static Builder builder() { @@ -9498,18 +20427,35 @@ public static Builder builder() { } public static class Builder { + private Object account; + private Map extraParams; + private SourceType sourceType; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Alma build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Alma(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodData.StripeBalance build() { + return new PaymentIntentUpdateParams.PaymentMethodData.StripeBalance( + this.account, this.extraParams, this.sourceType); + } + + /** The connected account ID whose Stripe balance to use as the source of payment. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** The connected account ID whose Stripe balance to use as the source of payment. */ + public Builder setAccount(EmptyParam account) { + this.account = account; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alma#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.StripeBalance#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9522,8 +20468,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alma#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.StripeBalance#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9532,12 +20478,41 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * The source_type + * of the balance + */ + public Builder setSourceType( + PaymentIntentUpdateParams.PaymentMethodData.StripeBalance.SourceType sourceType) { + this.sourceType = sourceType; + return this; + } + } + + public enum SourceType implements ApiRequestParams.EnumParam { + @SerializedName("bank_account") + BANK_ACCOUNT("bank_account"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("fpx") + FPX("fpx"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SourceType(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class AmazonPay { + public static class Swish { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9547,7 +20522,7 @@ public static class AmazonPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AmazonPay(Map extraParams) { + private Swish(Map extraParams) { this.extraParams = extraParams; } @@ -9559,15 +20534,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.AmazonPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.AmazonPay(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodData.Swish build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Swish(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AmazonPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Swish#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9580,8 +20555,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AmazonPay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Swish#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9595,15 +20570,7 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class AuBecsDebit { - /** Required. The account number for the bank account. */ - @SerializedName("account_number") - Object accountNumber; - - /** Required. Bank-State-Branch number of the bank account. */ - @SerializedName("bsb_number") - Object bsbNumber; - + public static class Twint { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9613,9 +20580,7 @@ public static class AuBecsDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AuBecsDebit(Object accountNumber, Object bsbNumber, Map extraParams) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; + private Twint(Map extraParams) { this.extraParams = extraParams; } @@ -9624,47 +20589,18 @@ public static Builder builder() { } public static class Builder { - private Object accountNumber; - - private Object bsbNumber; - private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit build() { - return new PaymentIntentUpdateParams.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. The account number for the bank account. */ - public Builder setAccountNumber(EmptyParam 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; - } - - /** Required. Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(EmptyParam bsbNumber) { - this.bsbNumber = bsbNumber; - return this; + public PaymentIntentUpdateParams.PaymentMethodData.Twint build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Twint(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Twint#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9677,8 +20613,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AuBecsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Twint#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9692,11 +20628,19 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class BacsDebit { - /** Account number of the bank account that the funds will be debited from. */ + public static class UsBankAccount { + /** Account holder type: individual or company. */ + @SerializedName("account_holder_type") + AccountHolderType accountHolderType; + + /** Account number of the bank account. */ @SerializedName("account_number") Object accountNumber; + /** Account type: checkings or savings. Defaults to checking if omitted. */ + @SerializedName("account_type") + AccountType accountType; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9706,14 +20650,27 @@ public static class BacsDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - @SerializedName("sort_code") - Object sortCode; + /** The ID of a Financial Connections Account to use as a payment method. */ + @SerializedName("financial_connections_account") + Object financialConnectionsAccount; - private BacsDebit(Object accountNumber, Map extraParams, Object sortCode) { + /** Routing number of the bank account. */ + @SerializedName("routing_number") + Object routingNumber; + + private UsBankAccount( + AccountHolderType accountHolderType, + Object accountNumber, + AccountType accountType, + Map extraParams, + Object financialConnectionsAccount, + Object routingNumber) { + this.accountHolderType = accountHolderType; this.accountNumber = accountNumber; + this.accountType = accountType; this.extraParams = extraParams; - this.sortCode = sortCode; + this.financialConnectionsAccount = financialConnectionsAccount; + this.routingNumber = routingNumber; } public static Builder builder() { @@ -9721,35 +20678,61 @@ public static Builder builder() { } public static class Builder { + private AccountHolderType accountHolderType; + private Object accountNumber; + private AccountType accountType; + private Map extraParams; - private Object sortCode; + private Object financialConnectionsAccount; + + private Object routingNumber; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount build() { + return new PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount( + this.accountHolderType, + this.accountNumber, + this.accountType, + this.extraParams, + this.financialConnectionsAccount, + this.routingNumber); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.BacsDebit build() { - return new PaymentIntentUpdateParams.PaymentMethodData.BacsDebit( - this.accountNumber, this.extraParams, this.sortCode); + /** Account holder type: individual or company. */ + public Builder setAccountHolderType( + PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount.AccountHolderType + accountHolderType) { + this.accountHolderType = accountHolderType; + return this; } - /** Account number of the bank account that the funds will be debited from. */ + /** Account number of the bank account. */ public Builder setAccountNumber(String accountNumber) { this.accountNumber = accountNumber; return this; } - /** Account number of the bank account that the funds will be debited from. */ + /** Account number of the bank account. */ public Builder setAccountNumber(EmptyParam accountNumber) { this.accountNumber = accountNumber; return this; } + /** Account type: checkings or savings. Defaults to checking if omitted. */ + public Builder setAccountType( + PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount.AccountType accountType) { + this.accountType = accountType; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.BacsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9762,8 +20745,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.BacsDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9773,23 +20756,65 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - public Builder setSortCode(String sortCode) { - this.sortCode = sortCode; + /** The ID of a Financial Connections Account to use as a payment method. */ + public Builder setFinancialConnectionsAccount(String financialConnectionsAccount) { + this.financialConnectionsAccount = financialConnectionsAccount; return this; } - /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ - public Builder setSortCode(EmptyParam sortCode) { - this.sortCode = sortCode; + /** The ID of a Financial Connections Account to use as a payment method. */ + public Builder setFinancialConnectionsAccount(EmptyParam financialConnectionsAccount) { + this.financialConnectionsAccount = financialConnectionsAccount; + return this; + } + + /** Routing number of the bank account. */ + public Builder setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + /** Routing number of the bank account. */ + public Builder setRoutingNumber(EmptyParam routingNumber) { + this.routingNumber = routingNumber; return this; } } + + public enum AccountHolderType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("individual") + INDIVIDUAL("individual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountHolderType(String value) { + this.value = value; + } + } + + public enum AccountType implements ApiRequestParams.EnumParam { + @SerializedName("checking") + CHECKING("checking"), + + @SerializedName("savings") + SAVINGS("savings"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AccountType(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Bancontact { + public static class WechatPay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9799,7 +20824,7 @@ public static class Bancontact { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Bancontact(Map extraParams) { + private WechatPay(Map extraParams) { this.extraParams = extraParams; } @@ -9811,14 +20836,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Bancontact build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Bancontact(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodData.WechatPay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.WechatPay(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Bancontact#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.WechatPay#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9832,7 +20857,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Bancontact#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.WechatPay#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9847,7 +20872,7 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Billie { + public static class Zip { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9857,7 +20882,7 @@ public static class Billie { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Billie(Map extraParams) { + private Zip(Map extraParams) { this.extraParams = extraParams; } @@ -9869,14 +20894,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Billie build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Billie(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodData.Zip build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Zip(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Billie#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Zip#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9890,7 +20915,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Billie#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Zip#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9903,2020 +20928,2046 @@ public Builder putAllExtraParam(Map map) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + public enum AllowRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), - /** Billing phone number (including extension). */ - @SerializedName("phone") - Object phone; + @SerializedName("limited") + LIMITED("limited"), - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - @SerializedName("tax_id") - Object taxId; + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); - private BillingDetails( - Object address, - Object email, - Map extraParams, - Object name, - Object phone, - Object taxId) { - this.address = address; - this.email = email; - this.extraParams = extraParams; - this.name = name; - this.phone = phone; - this.taxId = taxId; - } + @Getter(onMethod_ = {@Override}) + private final String value; - public static Builder builder() { - return new Builder(); + AllowRedisplay(String value) { + this.value = value; } + } - public static class Builder { - private Object address; - - private Object email; - - private Map extraParams; + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), - private Object name; + @SerializedName("affirm") + AFFIRM("affirm"), - private Object phone; + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), - private Object taxId; + @SerializedName("alipay") + ALIPAY("alipay"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.BillingDetails build() { - return new PaymentIntentUpdateParams.PaymentMethodData.BillingDetails( - this.address, this.email, this.extraParams, this.name, this.phone, this.taxId); - } + @SerializedName("alma") + ALMA("alma"), - /** Billing address. */ - public Builder setAddress( - PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address address) { - this.address = address; - return this; - } + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), - /** Billing address. */ - public Builder setAddress(EmptyParam address) { - this.address = address; - return this; - } + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), - /** Email address. */ - public Builder setEmail(String email) { - this.email = email; - return this; - } + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), - /** Email address. */ - public Builder setEmail(EmptyParam email) { - this.email = email; - return this; - } + @SerializedName("bancontact") + BANCONTACT("bancontact"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.BillingDetails#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("billie") + BILLIE("billie"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.BillingDetails#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("blik") + BLIK("blik"), - /** Full name. */ - public Builder setName(String name) { - this.name = name; - return this; - } + @SerializedName("boleto") + BOLETO("boleto"), - /** Full name. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + @SerializedName("cashapp") + CASHAPP("cashapp"), - /** Billing phone number (including extension). */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } + @SerializedName("crypto") + CRYPTO("crypto"), - /** Billing phone number (including extension). */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; - } + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - public Builder setTaxId(String taxId) { - this.taxId = taxId; - return this; - } + @SerializedName("eps") + EPS("eps"), - /** - * Taxpayer identification number. Used only for transactions between LATAM buyers and - * non-LATAM sellers. - */ - public Builder setTaxId(EmptyParam taxId) { - this.taxId = taxId; - return this; - } - } + @SerializedName("fpx") + FPX("fpx"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - Object city; + @SerializedName("giropay") + GIROPAY("giropay"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - Object country; + @SerializedName("gopay") + GOPAY("gopay"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("grabpay") + GRABPAY("grabpay"), - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - Object line1; + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - Object line2; + @SerializedName("ideal") + IDEAL("ideal"), - /** ZIP or postal code. */ - @SerializedName("postal_code") - Object postalCode; + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), - /** State, county, province, or region. */ - @SerializedName("state") - Object state; + @SerializedName("klarna") + KLARNA("klarna"), - private Address( - Object city, - Object country, - Map extraParams, - Object line1, - Object line2, - Object postalCode, - Object state) { - this.city = city; - this.country = country; - this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; - } + @SerializedName("konbini") + KONBINI("konbini"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("kr_card") + KR_CARD("kr_card"), - public static class Builder { - private Object city; + @SerializedName("link") + LINK("link"), - private Object country; + @SerializedName("mb_way") + MB_WAY("mb_way"), - private Map extraParams; + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), - private Object line1; + @SerializedName("multibanco") + MULTIBANCO("multibanco"), - private Object line2; + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), - private Object postalCode; + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), - private Object state; + @SerializedName("oxxo") + OXXO("oxxo"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address build() { - return new PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address( - this.city, - this.country, - this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); - } + @SerializedName("p24") + P24("p24"), - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; - return this; - } + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), - /** City, district, suburb, town, or village. */ - public Builder setCity(EmptyParam city) { - this.city = city; - return this; - } + @SerializedName("payco") + PAYCO("payco"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; - return this; - } + @SerializedName("paynow") + PAYNOW("paynow"), - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - public Builder setCountry(EmptyParam country) { - this.country = country; - return this; - } + @SerializedName("paypal") + PAYPAL("paypal"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("paypay") + PAYPAY("paypay"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("payto") + PAYTO("payto"), - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } + @SerializedName("pix") + PIX("pix"), - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(EmptyParam line1) { - this.line1 = line1; - return this; - } + @SerializedName("promptpay") + PROMPTPAY("promptpay"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } + @SerializedName("qris") + QRIS("qris"), - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(EmptyParam line2) { - this.line2 = line2; - return this; - } + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), - /** ZIP or postal code. */ - public Builder setPostalCode(EmptyParam postalCode) { - this.postalCode = postalCode; - return this; - } + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; - return this; - } + @SerializedName("sofort") + SOFORT("sofort"), - /** State, county, province, or region. */ - public Builder setState(EmptyParam state) { - this.state = state; - return this; - } - } - } - } + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @SerializedName("swish") + SWISH("swish"), - private Blik(Map extraParams) { - this.extraParams = extraParams; - } + @SerializedName("twint") + TWINT("twint"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), - public static class Builder { - private Map extraParams; + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Blik build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Blik(this.extraParams); - } + @SerializedName("zip") + ZIP("zip"); - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.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; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.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; - } + Type(String value) { + this.value = value; } } + } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions { + /** + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the ACSS + * Debit payment method options. + */ + @SerializedName("acss_debit") + Object acssDebit; - /** - * Required. The tax ID of the customer (CPF for individual consumers or CNPJ - * for businesses consumers) - */ - @SerializedName("tax_id") - Object taxId; + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + @SerializedName("affirm") + Object affirm; - private Boleto(Map extraParams, Object taxId) { - this.extraParams = extraParams; - this.taxId = taxId; - } + /** + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. + */ + @SerializedName("afterpay_clearpay") + Object afterpayClearpay; - public static Builder builder() { - return new Builder(); - } + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + @SerializedName("alipay") + Object alipay; - public static class Builder { - private Map extraParams; + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + @SerializedName("alma") + Object alma; - private Object taxId; + /** + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. + */ + @SerializedName("amazon_pay") + Object amazonPay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Boleto build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Boleto( - this.extraParams, this.taxId); - } + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the AU + * BECS Direct Debit payment method options. + */ + @SerializedName("au_becs_debit") + Object auBecsDebit; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Boleto#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the BACS + * Debit payment method options. + */ + @SerializedName("bacs_debit") + Object bacsDebit; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Boleto#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + @SerializedName("bancontact") + Object bancontact; - /** - * 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; - } + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + @SerializedName("billie") + Object billie; - /** - * Required. The tax ID of the customer (CPF for individual consumers or - * CNPJ for businesses consumers) - */ - public Builder setTaxId(EmptyParam taxId) { - this.taxId = taxId; - return this; - } - } - } + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + @SerializedName("blik") + Object blik; - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + @SerializedName("boleto") + Object boleto; - private Cashapp(Map extraParams) { - this.extraParams = extraParams; - } + /** Configuration for any card payments attempted on this PaymentIntent. */ + @SerializedName("card") + Object card; - public static Builder builder() { - return new Builder(); - } + /** + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + @SerializedName("card_present") + Object cardPresent; - public static class Builder { - private Map extraParams; + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App + * Pay payment method options. + */ + @SerializedName("cashapp") + Object cashapp; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Cashapp build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Cashapp(this.extraParams); - } + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + @SerializedName("crypto") + Object crypto; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.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; - } + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the + * customer balance payment method options. + */ + @SerializedName("customer_balance") + Object customerBalance; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.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; - } - } - } + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS payment + * method options. + */ + @SerializedName("eps") + Object eps; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Crypto { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private Crypto(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment + * method options. + */ + @SerializedName("fpx") + Object fpx; - public static Builder builder() { - return new Builder(); - } + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay + * payment method options. + */ + @SerializedName("giropay") + Object giropay; - public static class Builder { - private Map extraParams; + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + @SerializedName("gopay") + Object gopay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Crypto build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Crypto(this.extraParams); - } + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay + * payment method options. + */ + @SerializedName("grabpay") + Object grabpay; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Crypto#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the + * Indonesia Bank Transfer payment method options. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Crypto#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + @SerializedName("ideal") + Object ideal; - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + @SerializedName("interac_present") + Object interacPresent; - private CustomerBalance(Map extraParams) { - this.extraParams = extraParams; - } + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the Kakao + * Pay payment method options. + */ + @SerializedName("kakao_pay") + Object kakaoPay; - public static Builder builder() { - return new Builder(); - } + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + @SerializedName("klarna") + Object klarna; - public static class Builder { - private Map extraParams; + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini + * payment method options. + */ + @SerializedName("konbini") + Object konbini; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.CustomerBalance build() { - return new PaymentIntentUpdateParams.PaymentMethodData.CustomerBalance(this.extraParams); - } + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR Card + * payment method options. + */ + @SerializedName("kr_card") + Object krCard; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.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; - } + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + @SerializedName("link") + Object link; + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + @SerializedName("mobilepay") + Object mobilepay; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.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; - } - } - } + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + @SerializedName("multibanco") + Object multibanco; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Eps { - /** The customer's bank. */ - @SerializedName("bank") - Bank bank; + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the Naver + * Pay payment method options. + */ + @SerializedName("naver_pay") + Object naverPay; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about the + * NZ BECS Direct Debit payment method options. + */ + @SerializedName("nz_bank_account") + Object nzBankAccount; - private Eps(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; - } + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + @SerializedName("oxxo") + Object oxxo; - public static Builder builder() { - return new Builder(); - } + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + @SerializedName("p24") + Object p24; - public static class Builder { - private Bank bank; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; - private Map extraParams; + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + @SerializedName("payco") + Object payco; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Eps build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Eps(this.bank, this.extraParams); - } + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + @SerializedName("paynow") + Object paynow; - /** The customer's bank. */ - public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.Eps.Bank bank) { - this.bank = bank; - return this; - } + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + @SerializedName("paypal") + Object paypal; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Eps#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Eps#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Object payto; - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("arzte_und_apotheker_bank") - ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"), + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment + * method options. + */ + @SerializedName("pix") + Object pix; - @SerializedName("austrian_anadi_bank_ag") - AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"), + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + @SerializedName("promptpay") + Object promptpay; - @SerializedName("bank_austria") - BANK_AUSTRIA("bank_austria"), + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + @SerializedName("qris") + Object qris; - @SerializedName("bankhaus_carl_spangler") - BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + @SerializedName("rechnung") + Object rechnung; - @SerializedName("bankhaus_schelhammer_und_schattera_ag") - BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + @SerializedName("revolut_pay") + Object revolutPay; - @SerializedName("bawag_psk_ag") - BAWAG_PSK_AG("bawag_psk_ag"), + /** + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. + */ + @SerializedName("samsung_pay") + Object samsungPay; - @SerializedName("bks_bank_ag") - BKS_BANK_AG("bks_bank_ag"), + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + @SerializedName("satispay") + Object satispay; - @SerializedName("brull_kallmus_bank_ag") - BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), + /** + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the SEPA + * Debit payment method options. + */ + @SerializedName("sepa_debit") + Object sepaDebit; - @SerializedName("btv_vier_lander_bank") - BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + @SerializedName("shopeepay") + Object shopeepay; - @SerializedName("capital_bank_grawe_gruppe_ag") - CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + @SerializedName("sofort") + Object sofort; - @SerializedName("deutsche_bank_ag") - DEUTSCHE_BANK_AG("deutsche_bank_ag"), + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + @SerializedName("stripe_balance") + Object stripeBalance; - @SerializedName("dolomitenbank") - DOLOMITENBANK("dolomitenbank"), + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + @SerializedName("swish") + Object swish; - @SerializedName("easybank_ag") - EASYBANK_AG("easybank_ag"), + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + @SerializedName("twint") + Object twint; + + /** + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the + * US bank account payment method options. + */ + @SerializedName("us_bank_account") + Object usBankAccount; + + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + @SerializedName("wechat_pay") + Object wechatPay; - @SerializedName("erste_bank_und_sparkassen") - ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment + * method options. + */ + @SerializedName("zip") + Object zip; - @SerializedName("hypo_alpeadriabank_international_ag") - HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), + private PaymentMethodOptions( + Object acssDebit, + Object affirm, + Object afterpayClearpay, + Object alipay, + Object alma, + Object amazonPay, + Object auBecsDebit, + Object bacsDebit, + Object bancontact, + Object billie, + Object blik, + Object boleto, + Object card, + Object cardPresent, + Object cashapp, + Object crypto, + Object customerBalance, + Object eps, + Map extraParams, + Object fpx, + Object giropay, + Object gopay, + Object grabpay, + Object idBankTransfer, + Object ideal, + Object interacPresent, + Object kakaoPay, + Object klarna, + Object konbini, + Object krCard, + Object link, + Object mbWay, + Object mobilepay, + Object multibanco, + Object naverPay, + Object nzBankAccount, + Object oxxo, + Object p24, + Object payByBank, + Object payco, + Object paynow, + Object paypal, + Object paypay, + Object payto, + Object pix, + Object promptpay, + Object qris, + Object rechnung, + Object revolutPay, + Object samsungPay, + Object satispay, + Object sepaDebit, + Object shopeepay, + Object sofort, + Object stripeBalance, + Object swish, + Object twint, + Object usBankAccount, + Object wechatPay, + Object zip) { + this.acssDebit = acssDebit; + this.affirm = affirm; + this.afterpayClearpay = afterpayClearpay; + this.alipay = alipay; + this.alma = alma; + this.amazonPay = amazonPay; + this.auBecsDebit = auBecsDebit; + this.bacsDebit = bacsDebit; + this.bancontact = bancontact; + this.billie = billie; + this.blik = blik; + this.boleto = boleto; + this.card = card; + this.cardPresent = cardPresent; + this.cashapp = cashapp; + this.crypto = crypto; + this.customerBalance = customerBalance; + this.eps = eps; + this.extraParams = extraParams; + this.fpx = fpx; + this.giropay = giropay; + this.gopay = gopay; + this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; + this.ideal = ideal; + this.interacPresent = interacPresent; + this.kakaoPay = kakaoPay; + this.klarna = klarna; + this.konbini = konbini; + this.krCard = krCard; + this.link = link; + this.mbWay = mbWay; + this.mobilepay = mobilepay; + this.multibanco = multibanco; + this.naverPay = naverPay; + this.nzBankAccount = nzBankAccount; + this.oxxo = oxxo; + this.p24 = p24; + this.payByBank = payByBank; + this.payco = payco; + this.paynow = paynow; + this.paypal = paypal; + this.paypay = paypay; + this.payto = payto; + this.pix = pix; + this.promptpay = promptpay; + this.qris = qris; + this.rechnung = rechnung; + this.revolutPay = revolutPay; + this.samsungPay = samsungPay; + this.satispay = satispay; + this.sepaDebit = sepaDebit; + this.shopeepay = shopeepay; + this.sofort = sofort; + this.stripeBalance = stripeBalance; + this.swish = swish; + this.twint = twint; + this.usBankAccount = usBankAccount; + this.wechatPay = wechatPay; + this.zip = zip; + } - @SerializedName("hypo_bank_burgenland_aktiengesellschaft") - HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien") - HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), + public static class Builder { + private Object acssDebit; - @SerializedName("hypo_oberosterreich_salzburg_steiermark") - HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"), + private Object affirm; - @SerializedName("hypo_tirol_bank_ag") - HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"), + private Object afterpayClearpay; - @SerializedName("hypo_vorarlberg_bank_ag") - HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"), + private Object alipay; - @SerializedName("marchfelder_bank") - MARCHFELDER_BANK("marchfelder_bank"), + private Object alma; - @SerializedName("oberbank_ag") - OBERBANK_AG("oberbank_ag"), + private Object amazonPay; - @SerializedName("raiffeisen_bankengruppe_osterreich") - RAIFFEISEN_BANKENGRUPPE_OSTERREICH("raiffeisen_bankengruppe_osterreich"), + private Object auBecsDebit; - @SerializedName("schoellerbank_ag") - SCHOELLERBANK_AG("schoellerbank_ag"), + private Object bacsDebit; - @SerializedName("sparda_bank_wien") - SPARDA_BANK_WIEN("sparda_bank_wien"), + private Object bancontact; - @SerializedName("volksbank_gruppe") - VOLKSBANK_GRUPPE("volksbank_gruppe"), + private Object billie; - @SerializedName("volkskreditbank_ag") - VOLKSKREDITBANK_AG("volkskreditbank_ag"), + private Object blik; - @SerializedName("vr_bank_braunau") - VR_BANK_BRAUNAU("vr_bank_braunau"); + private Object boleto; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object card; - Bank(String value) { - this.value = value; - } - } - } + private Object cardPresent; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Fpx { - /** Account holder type for FPX transaction. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; + private Object cashapp; - /** Required. The customer's bank. */ - @SerializedName("bank") - Bank bank; + private Object crypto; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Object customerBalance; - private Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) { - this.accountHolderType = accountHolderType; - this.bank = bank; - this.extraParams = extraParams; - } + private Object eps; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private AccountHolderType accountHolderType; + private Object fpx; - private Bank bank; + private Object giropay; - private Map extraParams; + private Object gopay; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Fpx build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Fpx( - this.accountHolderType, this.bank, this.extraParams); - } + private Object grabpay; - /** Account holder type for FPX transaction. */ - public Builder setAccountHolderType( - PaymentIntentUpdateParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + private Object idBankTransfer; - /** Required. The customer's bank. */ - public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.Fpx.Bank bank) { - this.bank = bank; - return this; - } + private Object ideal; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Fpx#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Object interacPresent; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Fpx#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } + private Object kakaoPay; - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + private Object klarna; - @SerializedName("individual") - INDIVIDUAL("individual"); + private Object konbini; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object krCard; - AccountHolderType(String value) { - this.value = value; - } - } + private Object link; - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("affin_bank") - AFFIN_BANK("affin_bank"), + private Object mbWay; - @SerializedName("agrobank") - AGROBANK("agrobank"), + private Object mobilepay; - @SerializedName("alliance_bank") - ALLIANCE_BANK("alliance_bank"), + private Object multibanco; - @SerializedName("ambank") - AMBANK("ambank"), + private Object naverPay; - @SerializedName("bank_islam") - BANK_ISLAM("bank_islam"), + private Object nzBankAccount; - @SerializedName("bank_muamalat") - BANK_MUAMALAT("bank_muamalat"), + private Object oxxo; - @SerializedName("bank_of_china") - BANK_OF_CHINA("bank_of_china"), + private Object p24; - @SerializedName("bank_rakyat") - BANK_RAKYAT("bank_rakyat"), + private Object payByBank; - @SerializedName("bsn") - BSN("bsn"), + private Object payco; - @SerializedName("cimb") - CIMB("cimb"), + private Object paynow; - @SerializedName("deutsche_bank") - DEUTSCHE_BANK("deutsche_bank"), + private Object paypal; - @SerializedName("hong_leong_bank") - HONG_LEONG_BANK("hong_leong_bank"), + private Object paypay; - @SerializedName("hsbc") - HSBC("hsbc"), + private Object payto; - @SerializedName("kfh") - KFH("kfh"), + private Object pix; - @SerializedName("maybank2e") - MAYBANK2E("maybank2e"), + private Object promptpay; - @SerializedName("maybank2u") - MAYBANK2U("maybank2u"), + private Object qris; - @SerializedName("ocbc") - OCBC("ocbc"), + private Object rechnung; - @SerializedName("pb_enterprise") - PB_ENTERPRISE("pb_enterprise"), + private Object revolutPay; - @SerializedName("public_bank") - PUBLIC_BANK("public_bank"), + private Object samsungPay; - @SerializedName("rhb") - RHB("rhb"), + private Object satispay; - @SerializedName("standard_chartered") - STANDARD_CHARTERED("standard_chartered"), + private Object sepaDebit; - @SerializedName("uob") - UOB("uob"); + private Object shopeepay; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object sofort; - Bank(String value) { - this.value = value; - } + private Object stripeBalance; + + private Object swish; + + private Object twint; + + private Object usBankAccount; + + private Object wechatPay; + + private Object zip; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions( + this.acssDebit, + this.affirm, + this.afterpayClearpay, + this.alipay, + this.alma, + this.amazonPay, + this.auBecsDebit, + this.bacsDebit, + this.bancontact, + this.billie, + this.blik, + this.boleto, + this.card, + this.cardPresent, + this.cashapp, + this.crypto, + this.customerBalance, + this.eps, + this.extraParams, + this.fpx, + this.giropay, + this.gopay, + this.grabpay, + this.idBankTransfer, + this.ideal, + this.interacPresent, + this.kakaoPay, + this.klarna, + this.konbini, + this.krCard, + this.link, + this.mbWay, + this.mobilepay, + this.multibanco, + this.naverPay, + this.nzBankAccount, + this.oxxo, + this.p24, + this.payByBank, + this.payco, + this.paynow, + this.paypal, + this.paypay, + this.payto, + this.pix, + this.promptpay, + this.qris, + this.rechnung, + this.revolutPay, + this.samsungPay, + this.satispay, + this.sepaDebit, + this.shopeepay, + this.sofort, + this.stripeBalance, + this.swish, + this.twint, + this.usBankAccount, + this.wechatPay, + this.zip); } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Giropay { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the + * ACSS Debit payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Giropay(Map extraParams) { - this.extraParams = extraParams; + public Builder setAcssDebit( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit acssDebit) { + this.acssDebit = acssDebit; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the + * ACSS Debit payment method options. + */ + public Builder setAcssDebit(EmptyParam acssDebit) { + this.acssDebit = acssDebit; + return this; } - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Giropay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Giropay(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Giropay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + public Builder setAffirm(PaymentIntentUpdateParams.PaymentMethodOptions.Affirm affirm) { + this.affirm = affirm; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Giropay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm + * payment method options. + */ + public Builder setAffirm(EmptyParam affirm) { + this.affirm = affirm; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Gopay { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Gopay(Map extraParams) { - this.extraParams = extraParams; + public Builder setAfterpayClearpay( + PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about + * the Afterpay Clearpay payment method options. + */ + public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) { + this.afterpayClearpay = afterpayClearpay; + return this; } - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Gopay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Gopay(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Gopay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Gopay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. + */ + public Builder setAlipay(PaymentIntentUpdateParams.PaymentMethodOptions.Alipay alipay) { + this.alipay = alipay; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Grabpay { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Grabpay(Map extraParams) { - this.extraParams = extraParams; + public Builder setAlipay(EmptyParam alipay) { + this.alipay = alipay; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + public Builder setAlma(PaymentIntentUpdateParams.PaymentMethodOptions.Alma alma) { + this.alma = alma; + return this; } - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Grabpay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Grabpay(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Grabpay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Grabpay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma + * payment method options. + */ + public Builder setAlma(EmptyParam alma) { + this.alma = alma; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class IdBankTransfer { - /** Bank where the account is held. */ - @SerializedName("bank") - Bank bank; + /** + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. + */ + public Builder setAmazonPay( + PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay amazonPay) { + this.amazonPay = amazonPay; + return this; + } /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the + * Amazon Pay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setAmazonPay(EmptyParam amazonPay) { + this.amazonPay = amazonPay; + return this; + } - private IdBankTransfer(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the + * AU BECS Direct Debit payment method options. + */ + public Builder setAuBecsDebit( + PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) { + this.auBecsDebit = auBecsDebit; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the + * AU BECS Direct Debit payment method options. + */ + public Builder setAuBecsDebit(EmptyParam auBecsDebit) { + this.auBecsDebit = auBecsDebit; + return this; } - public static class Builder { - private Bank bank; + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. + */ + public Builder setBacsDebit( + PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit bacsDebit) { + this.bacsDebit = bacsDebit; + return this; + } - private Map extraParams; + /** + * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the + * BACS Debit payment method options. + */ + public Builder setBacsDebit(EmptyParam bacsDebit) { + this.bacsDebit = bacsDebit; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer build() { - return new PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer( - this.bank, this.extraParams); - } + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + public Builder setBancontact( + PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact bancontact) { + this.bancontact = bancontact; + return this; + } - /** Bank where the account is held. */ - public Builder setBank( - PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer.Bank bank) { - this.bank = bank; - return this; - } + /** + * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the + * Bancontact payment method options. + */ + public Builder setBancontact(EmptyParam bancontact) { + this.bancontact = bancontact; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + public Builder setBillie(PaymentIntentUpdateParams.PaymentMethodOptions.Billie billie) { + this.billie = billie; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie + * payment method options. + */ + public Builder setBillie(EmptyParam billie) { + this.billie = billie; + return this; } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("bca") - BCA("bca"), + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + public Builder setBlik(PaymentIntentUpdateParams.PaymentMethodOptions.Blik blik) { + this.blik = blik; + return this; + } - @SerializedName("bni") - BNI("bni"), + /** + * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK + * payment method options. + */ + public Builder setBlik(EmptyParam blik) { + this.blik = blik; + return this; + } - @SerializedName("bri") - BRI("bri"), + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + public Builder setBoleto(PaymentIntentUpdateParams.PaymentMethodOptions.Boleto boleto) { + this.boleto = boleto; + return this; + } - @SerializedName("cimb") - CIMB("cimb"), + /** + * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto + * payment method options. + */ + public Builder setBoleto(EmptyParam boleto) { + this.boleto = boleto; + return this; + } - @SerializedName("permata") - PERMATA("permata"); + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(PaymentIntentUpdateParams.PaymentMethodOptions.Card card) { + this.card = card; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Configuration for any card payments attempted on this PaymentIntent. */ + public Builder setCard(EmptyParam card) { + this.card = card; + return this; + } - Bank(String value) { - this.value = value; - } + /** + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. + */ + public Builder setCardPresent( + PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent cardPresent) { + this.cardPresent = cardPresent; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Ideal { /** - * The customer's bank. Only use this parameter for existing customers. Don't use it for new - * customers. + * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the + * Card Present payment method options. */ - @SerializedName("bank") - Bank bank; + public Builder setCardPresent(EmptyParam cardPresent) { + this.cardPresent = cardPresent; + return this; + } /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash + * App Pay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setCashapp(PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp cashapp) { + this.cashapp = cashapp; + return this; + } - private Ideal(Bank bank, Map extraParams) { - this.bank = bank; - this.extraParams = extraParams; + /** + * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash + * App Pay payment method options. + */ + public Builder setCashapp(EmptyParam cashapp) { + this.cashapp = cashapp; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(PaymentIntentUpdateParams.PaymentMethodOptions.Crypto crypto) { + this.crypto = crypto; + return this; } - public static class Builder { - private Bank bank; + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(EmptyParam crypto) { + this.crypto = crypto; + return this; + } - private Map extraParams; + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about + * the customer balance payment method options. + */ + public Builder setCustomerBalance( + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance customerBalance) { + this.customerBalance = customerBalance; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Ideal build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Ideal(this.bank, this.extraParams); - } + /** + * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about + * the customer balance payment method options. + */ + public Builder setCustomerBalance(EmptyParam customerBalance) { + this.customerBalance = customerBalance; + return this; + } - /** - * The customer's bank. Only use this parameter for existing customers. Don't use it for new - * customers. - */ - public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.Ideal.Bank bank) { - this.bank = bank; - return this; - } + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS + * payment method options. + */ + public Builder setEps(PaymentIntentUpdateParams.PaymentMethodOptions.Eps eps) { + this.eps = eps; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Ideal#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS + * payment method options. + */ + public Builder setEps(EmptyParam eps) { + this.eps = eps; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Ideal#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); } + this.extraParams.put(key, value); + return this; } - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("abn_amro") - ABN_AMRO("abn_amro"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentUpdateParams.PaymentMethodOptions#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - @SerializedName("asn_bank") - ASN_BANK("asn_bank"), + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX + * payment method options. + */ + public Builder setFpx(PaymentIntentUpdateParams.PaymentMethodOptions.Fpx fpx) { + this.fpx = fpx; + return this; + } - @SerializedName("bunq") - BUNQ("bunq"), + /** + * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX + * payment method options. + */ + public Builder setFpx(EmptyParam fpx) { + this.fpx = fpx; + return this; + } - @SerializedName("buut") - BUUT("buut"), + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the + * Giropay payment method options. + */ + public Builder setGiropay(PaymentIntentUpdateParams.PaymentMethodOptions.Giropay giropay) { + this.giropay = giropay; + return this; + } - @SerializedName("handelsbanken") - HANDELSBANKEN("handelsbanken"), + /** + * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the + * Giropay payment method options. + */ + public Builder setGiropay(EmptyParam giropay) { + this.giropay = giropay; + return this; + } - @SerializedName("ing") - ING("ing"), + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + public Builder setGopay(PaymentIntentUpdateParams.PaymentMethodOptions.Gopay gopay) { + this.gopay = gopay; + return this; + } - @SerializedName("knab") - KNAB("knab"), + /** + * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay + * payment method options. + */ + public Builder setGopay(EmptyParam gopay) { + this.gopay = gopay; + return this; + } - @SerializedName("moneyou") - MONEYOU("moneyou"), + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the + * Grabpay payment method options. + */ + public Builder setGrabpay(PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay grabpay) { + this.grabpay = grabpay; + return this; + } - @SerializedName("n26") - N26("n26"), + /** + * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the + * Grabpay payment method options. + */ + public Builder setGrabpay(EmptyParam grabpay) { + this.grabpay = grabpay; + return this; + } - @SerializedName("nn") - NN("nn"), + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer( + PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } - @SerializedName("rabobank") - RABOBANK("rabobank"), + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } - @SerializedName("regiobank") - REGIOBANK("regiobank"), + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + public Builder setIdeal(PaymentIntentUpdateParams.PaymentMethodOptions.Ideal ideal) { + this.ideal = ideal; + return this; + } - @SerializedName("revolut") - REVOLUT("revolut"), + /** + * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal + * payment method options. + */ + public Builder setIdeal(EmptyParam ideal) { + this.ideal = ideal; + return this; + } - @SerializedName("sns_bank") - SNS_BANK("sns_bank"), + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about + * the Card Present payment method options. + */ + public Builder setInteracPresent( + PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent interacPresent) { + this.interacPresent = interacPresent; + return this; + } - @SerializedName("triodos_bank") - TRIODOS_BANK("triodos_bank"), + /** + * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about + * the Card Present payment method options. + */ + public Builder setInteracPresent(EmptyParam interacPresent) { + this.interacPresent = interacPresent; + return this; + } - @SerializedName("van_lanschot") - VAN_LANSCHOT("van_lanschot"), + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the + * Kakao Pay payment method options. + */ + public Builder setKakaoPay(PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay kakaoPay) { + this.kakaoPay = kakaoPay; + return this; + } - @SerializedName("yoursafe") - YOURSAFE("yoursafe"); + /** + * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the + * Kakao Pay payment method options. + */ + public Builder setKakaoPay(EmptyParam kakaoPay) { + this.kakaoPay = kakaoPay; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(PaymentIntentUpdateParams.PaymentMethodOptions.Klarna klarna) { + this.klarna = klarna; + return this; + } - Bank(String value) { - this.value = value; - } + /** + * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(EmptyParam klarna) { + this.klarna = klarna; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class InteracPresent { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the + * Konbini payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setKonbini(PaymentIntentUpdateParams.PaymentMethodOptions.Konbini konbini) { + this.konbini = konbini; + return this; + } - private InteracPresent(Map extraParams) { - this.extraParams = extraParams; + /** + * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the + * Konbini payment method options. + */ + public Builder setKonbini(EmptyParam konbini) { + this.konbini = konbini; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR + * Card payment method options. + */ + public Builder setKrCard(PaymentIntentUpdateParams.PaymentMethodOptions.KrCard krCard) { + this.krCard = krCard; + return this; } - public static class Builder { - private Map extraParams; + /** + * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR + * Card payment method options. + */ + public Builder setKrCard(EmptyParam krCard) { + this.krCard = krCard; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.InteracPresent build() { - return new PaymentIntentUpdateParams.PaymentMethodData.InteracPresent(this.extraParams); - } + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + public Builder setLink(PaymentIntentUpdateParams.PaymentMethodOptions.Link link) { + this.link = link; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.InteracPresent#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link + * payment method options. + */ + public Builder setLink(EmptyParam link) { + this.link = link; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.InteracPresent#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentUpdateParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KakaoPay { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private KakaoPay(Map extraParams) { - this.extraParams = extraParams; + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + public Builder setMobilepay( + PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay mobilepay) { + this.mobilepay = mobilepay; + return this; } - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.KakaoPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.KakaoPay(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.KakaoPay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.KakaoPay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the + * MobilePay payment method options. + */ + public Builder setMobilepay(EmptyParam mobilepay) { + this.mobilepay = mobilepay; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Klarna { - /** Customer's date of birth. */ - @SerializedName("dob") - Dob dob; + /** + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. + */ + public Builder setMultibanco( + PaymentIntentUpdateParams.PaymentMethodOptions.Multibanco multibanco) { + this.multibanco = multibanco; + return this; + } /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the + * Multibanco payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setMultibanco(EmptyParam multibanco) { + this.multibanco = multibanco; + return this; + } - private Klarna(Dob dob, Map extraParams) { - this.dob = dob; - this.extraParams = extraParams; + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the + * Naver Pay payment method options. + */ + public Builder setNaverPay(PaymentIntentUpdateParams.PaymentMethodOptions.NaverPay naverPay) { + this.naverPay = naverPay; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the + * Naver Pay payment method options. + */ + public Builder setNaverPay(EmptyParam naverPay) { + this.naverPay = naverPay; + return this; } - public static class Builder { - private Dob dob; + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about + * the NZ BECS Direct Debit payment method options. + */ + public Builder setNzBankAccount( + PaymentIntentUpdateParams.PaymentMethodOptions.NzBankAccount nzBankAccount) { + this.nzBankAccount = nzBankAccount; + return this; + } - private Map extraParams; + /** + * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about + * the NZ BECS Direct Debit payment method options. + */ + public Builder setNzBankAccount(EmptyParam nzBankAccount) { + this.nzBankAccount = nzBankAccount; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Klarna build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Klarna(this.dob, this.extraParams); - } + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + public Builder setOxxo(PaymentIntentUpdateParams.PaymentMethodOptions.Oxxo oxxo) { + this.oxxo = oxxo; + return this; + } - /** Customer's date of birth. */ - public Builder setDob(PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob dob) { - this.dob = dob; - return this; - } + /** + * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO + * payment method options. + */ + public Builder setOxxo(EmptyParam oxxo) { + this.oxxo = oxxo; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + public Builder setP24(PaymentIntentUpdateParams.PaymentMethodOptions.P24 p24) { + this.p24 = p24; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 + * payment method options. + */ + public Builder setP24(EmptyParam p24) { + this.p24 = p24; + return this; } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Dob { - /** Required. The day of birth, between 1 and 31. */ - @SerializedName("day") - Long day; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } - /** Required. The month of birth, between 1 and 12. */ - @SerializedName("month") - Long month; + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + public Builder setPayco(PaymentIntentUpdateParams.PaymentMethodOptions.Payco payco) { + this.payco = payco; + return this; + } - /** Required. The four-digit year of birth. */ - @SerializedName("year") - Long year; + /** + * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO + * payment method options. + */ + public Builder setPayco(EmptyParam payco) { + this.payco = payco; + return this; + } - private Dob(Long day, Map extraParams, Long month, Long year) { - this.day = day; - this.extraParams = extraParams; - this.month = month; - this.year = year; - } + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + public Builder setPaynow(PaymentIntentUpdateParams.PaymentMethodOptions.Paynow paynow) { + this.paynow = paynow; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow + * payment method options. + */ + public Builder setPaynow(EmptyParam paynow) { + this.paynow = paynow; + return this; + } - public static class Builder { - private Long day; + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + public Builder setPaypal(PaymentIntentUpdateParams.PaymentMethodOptions.Paypal paypal) { + this.paypal = paypal; + return this; + } - private Map extraParams; + /** + * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal + * payment method options. + */ + public Builder setPaypal(EmptyParam paypal) { + this.paypal = paypal; + return this; + } - private Long month; + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentUpdateParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } - private Long year; + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob( - this.day, this.extraParams, this.month, this.year); - } + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(PaymentIntentUpdateParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; - return this; - } + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(PaymentIntentUpdateParams.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna.Dob#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix + * payment method options. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; - return this; - } + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + public Builder setPromptpay( + PaymentIntentUpdateParams.PaymentMethodOptions.Promptpay promptpay) { + this.promptpay = promptpay; + return this; + } - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; - return this; - } - } + /** + * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the + * PromptPay payment method options. + */ + public Builder setPromptpay(EmptyParam promptpay) { + this.promptpay = promptpay; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Konbini { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setQris(PaymentIntentUpdateParams.PaymentMethodOptions.Qris qris) { + this.qris = qris; + return this; + } - private Konbini(Map extraParams) { - this.extraParams = extraParams; + /** + * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS + * payment method options. + */ + public Builder setQris(EmptyParam qris) { + this.qris = qris; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + public Builder setRechnung(PaymentIntentUpdateParams.PaymentMethodOptions.Rechnung rechnung) { + this.rechnung = rechnung; + return this; } - public static class Builder { - private Map extraParams; + /** + * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the + * Rechnung payment method options. + */ + public Builder setRechnung(EmptyParam rechnung) { + this.rechnung = rechnung; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Konbini build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Konbini(this.extraParams); - } + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + public Builder setRevolutPay( + PaymentIntentUpdateParams.PaymentMethodOptions.RevolutPay revolutPay) { + this.revolutPay = revolutPay; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Konbini#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the + * Revolut Pay payment method options. + */ + public Builder setRevolutPay(EmptyParam revolutPay) { + this.revolutPay = revolutPay; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Konbini#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. + */ + public Builder setSamsungPay( + PaymentIntentUpdateParams.PaymentMethodOptions.SamsungPay samsungPay) { + this.samsungPay = samsungPay; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KrCard { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the + * Samsung Pay payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private KrCard(Map extraParams) { - this.extraParams = extraParams; + public Builder setSamsungPay(EmptyParam samsungPay) { + this.samsungPay = samsungPay; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + public Builder setSatispay(PaymentIntentUpdateParams.PaymentMethodOptions.Satispay satispay) { + this.satispay = satispay; + return this; } - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.KrCard build() { - return new PaymentIntentUpdateParams.PaymentMethodData.KrCard(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.KrCard#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.KrCard#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the + * Satispay payment method options. + */ + public Builder setSatispay(EmptyParam satispay) { + this.satispay = satispay; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Link { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the + * SEPA Debit payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Link(Map extraParams) { - this.extraParams = extraParams; + public Builder setSepaDebit( + PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit sepaDebit) { + this.sepaDebit = sepaDebit; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the + * SEPA Debit payment method options. + */ + public Builder setSepaDebit(EmptyParam sepaDebit) { + this.sepaDebit = sepaDebit; + return this; } - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Link build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Link(this.extraParams); - } + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + public Builder setShopeepay( + PaymentIntentUpdateParams.PaymentMethodOptions.Shopeepay shopeepay) { + this.shopeepay = shopeepay; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Link#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the + * ShopeePay payment method options. + */ + public Builder setShopeepay(EmptyParam shopeepay) { + this.shopeepay = shopeepay; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Link#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. + */ + public Builder setSofort(PaymentIntentUpdateParams.PaymentMethodOptions.Sofort sofort) { + this.sofort = sofort; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MbWay { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT + * payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public Builder setSofort(EmptyParam sofort) { + this.sofort = sofort; + return this; + } - private MbWay(Map extraParams) { - this.extraParams = extraParams; + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + public Builder setStripeBalance( + PaymentIntentUpdateParams.PaymentMethodOptions.StripeBalance stripeBalance) { + this.stripeBalance = stripeBalance; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the + * Stripe Balance payment method options. + */ + public Builder setStripeBalance(EmptyParam stripeBalance) { + this.stripeBalance = stripeBalance; + return this; } - public static class Builder { - private Map extraParams; + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + public Builder setSwish(PaymentIntentUpdateParams.PaymentMethodOptions.Swish swish) { + this.swish = swish; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.MbWay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.MbWay(this.extraParams); - } + /** + * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish + * payment method options. + */ + public Builder setSwish(EmptyParam swish) { + this.swish = swish; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + public Builder setTwint(PaymentIntentUpdateParams.PaymentMethodOptions.Twint twint) { + this.twint = twint; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT + * payment method options. + */ + public Builder setTwint(EmptyParam twint) { + this.twint = twint; + return this; } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Mobilepay { /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about + * the US bank account payment method options. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Mobilepay(Map extraParams) { - this.extraParams = extraParams; + public Builder setUsBankAccount( + PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { + this.usBankAccount = usBankAccount; + return this; } - public static Builder builder() { - return new Builder(); + /** + * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about + * the US bank account payment method options. + */ + public Builder setUsBankAccount(EmptyParam usBankAccount) { + this.usBankAccount = usBankAccount; + return this; } - public static class Builder { - private Map extraParams; + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + public Builder setWechatPay( + PaymentIntentUpdateParams.PaymentMethodOptions.WechatPay wechatPay) { + this.wechatPay = wechatPay; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Mobilepay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Mobilepay(this.extraParams); - } + /** + * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the + * WeChat Pay payment method options. + */ + public Builder setWechatPay(EmptyParam wechatPay) { + this.wechatPay = wechatPay; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Mobilepay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip + * payment method options. + */ + public Builder setZip(PaymentIntentUpdateParams.PaymentMethodOptions.Zip zip) { + this.zip = zip; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Mobilepay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip + * payment method options. + */ + public Builder setZip(EmptyParam zip) { + this.zip = zip; + return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Multibanco { + public static class AcssDebit { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -11926,8 +22977,59 @@ public static class Multibanco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Multibanco(Map extraParams) { + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + + /** Bank account verification method. */ + @SerializedName("verification_method") + VerificationMethod verificationMethod; + + private AcssDebit( + Map extraParams, + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate, + VerificationMethod verificationMethod) { this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; + this.verificationMethod = verificationMethod; } public static Builder builder() { @@ -11937,15 +23039,28 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private MandateOptions mandateOptions; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private Object targetDate; + + private VerificationMethod verificationMethod; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Multibanco build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Multibanco(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit( + this.extraParams, + this.mandateOptions, + this.setupFutureUsage, + this.targetDate, + this.verificationMethod); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Multibanco#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -11959,7 +23074,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Multibanco#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -11969,359 +23084,354 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NaverPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. - */ - @SerializedName("funding") - Funding funding; - - private NaverPay(Map extraParams, Funding funding) { - this.extraParams = extraParams; - this.funding = funding; - } - - public static Builder builder() { - return new Builder(); - } - public static class Builder { - private Map extraParams; + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } - private Funding funding; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.NaverPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.NaverPay( - this.extraParams, this.funding); + /** + * 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; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.NaverPay#extraParams} for the - * field documentation. + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.NaverPay#extraParams} for the - * field documentation. + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; return this; } - /** - * Whether to use Naver Pay points or a card to fund this transaction. If not provided, this - * defaults to {@code card}. - */ - public Builder setFunding( - PaymentIntentUpdateParams.PaymentMethodData.NaverPay.Funding funding) { - this.funding = funding; + /** Bank account verification method. */ + public Builder setVerificationMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.VerificationMethod + verificationMethod) { + this.verificationMethod = verificationMethod; return this; } } - public enum Funding implements ApiRequestParams.EnumParam { - @SerializedName("card") - CARD("card"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + @SerializedName("custom_mandate_url") + Object customMandateUrl; - @SerializedName("points") - POINTS("points"); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + @SerializedName("interval_description") + Object intervalDescription; - Funding(String value) { - this.value = value; - } - } - } + /** Payment schedule for the mandate. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NzBankAccount { - /** - * The name on the bank account. Only required if the account holder name is different from - * the name of the authorized signatory collected in the PaymentMethod’s billing details. - */ - @SerializedName("account_holder_name") - Object accountHolderName; + /** Transaction type of the mandate. */ + @SerializedName("transaction_type") + TransactionType transactionType; - /** Required. The account number for the bank account. */ - @SerializedName("account_number") - Object accountNumber; + private MandateOptions( + Object customMandateUrl, + Map extraParams, + Object intervalDescription, + PaymentSchedule paymentSchedule, + TransactionType transactionType) { + this.customMandateUrl = customMandateUrl; + this.extraParams = extraParams; + this.intervalDescription = intervalDescription; + this.paymentSchedule = paymentSchedule; + this.transactionType = transactionType; + } - /** Required. The numeric code for the bank account's bank. */ - @SerializedName("bank_code") - Object bankCode; + public static Builder builder() { + return new Builder(); + } - /** Required. The numeric code for the bank account's bank branch. */ - @SerializedName("branch_code") - Object branchCode; + public static class Builder { + private Object customMandateUrl; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Map extraParams; - @SerializedName("reference") - Object reference; + private Object intervalDescription; - /** Required. The suffix of the bank account number. */ - @SerializedName("suffix") - Object suffix; + private PaymentSchedule paymentSchedule; - private NzBankAccount( - Object accountHolderName, - Object accountNumber, - Object bankCode, - Object branchCode, - Map extraParams, - Object reference, - Object suffix) { - this.accountHolderName = accountHolderName; - this.accountNumber = accountNumber; - this.bankCode = bankCode; - this.branchCode = branchCode; - this.extraParams = extraParams; - this.reference = reference; - this.suffix = suffix; - } + private TransactionType transactionType; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions( + this.customMandateUrl, + this.extraParams, + this.intervalDescription, + this.paymentSchedule, + this.transactionType); + } - public static class Builder { - private Object accountHolderName; + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + public Builder setCustomMandateUrl(String customMandateUrl) { + this.customMandateUrl = customMandateUrl; + return this; + } - private Object accountNumber; + /** + * A URL for custom mandate text to render during confirmation step. The URL will be + * rendered with additional GET parameters {@code payment_intent} and {@code + * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} + * and {@code setup_intent_client_secret} when confirming a Setup Intent. + */ + public Builder setCustomMandateUrl(EmptyParam customMandateUrl) { + this.customMandateUrl = customMandateUrl; + return this; + } - private Object bankCode; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Object branchCode; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private Map extraParams; + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + public Builder setIntervalDescription(String intervalDescription) { + this.intervalDescription = intervalDescription; + return this; + } - private Object reference; + /** + * Description of the mandate interval. Only required if 'payment_schedule' parameter is + * 'interval' or 'combined'. + */ + public Builder setIntervalDescription(EmptyParam intervalDescription) { + this.intervalDescription = intervalDescription; + return this; + } - private Object suffix; + /** Payment schedule for the mandate. */ + public Builder setPaymentSchedule( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount build() { - return new PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount( - this.accountHolderName, - this.accountNumber, - this.bankCode, - this.branchCode, - this.extraParams, - this.reference, - this.suffix); + /** Transaction type of the mandate. */ + public Builder setTransactionType( + PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions + .TransactionType + transactionType) { + this.transactionType = transactionType; + return this; + } } - /** - * The name on the bank account. Only required if the account holder name is different from - * the name of the authorized signatory collected in the PaymentMethod’s billing details. - */ - public Builder setAccountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; - return this; - } + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("combined") + COMBINED("combined"), - /** - * The name on the bank account. Only required if the account holder name is different from - * the name of the authorized signatory collected in the PaymentMethod’s billing details. - */ - public Builder setAccountHolderName(EmptyParam accountHolderName) { - this.accountHolderName = accountHolderName; - return this; - } + @SerializedName("interval") + INTERVAL("interval"), - /** Required. The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + @SerializedName("sporadic") + SPORADIC("sporadic"); - /** Required. The account number for the bank account. */ - public Builder setAccountNumber(EmptyParam accountNumber) { - this.accountNumber = accountNumber; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Required. The numeric code for the bank account's bank. */ - public Builder setBankCode(String bankCode) { - this.bankCode = bankCode; - return this; + PaymentSchedule(String value) { + this.value = value; + } } - /** Required. The numeric code for the bank account's bank. */ - public Builder setBankCode(EmptyParam bankCode) { - this.bankCode = bankCode; - return this; - } + public enum TransactionType implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** Required. The numeric code for the bank account's bank branch. */ - public Builder setBranchCode(String branchCode) { - this.branchCode = branchCode; - return this; - } + @SerializedName("personal") + PERSONAL("personal"); - /** Required. The numeric code for the bank account's bank branch. */ - public Builder setBranchCode(EmptyParam branchCode) { - this.branchCode = branchCode; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + TransactionType(String value) { + this.value = value; } - this.extraParams.put(key, value); - return this; } + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.NzBankAccount#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 SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - public Builder setReference(String reference) { - this.reference = reference; - return this; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - public Builder setReference(EmptyParam reference) { - this.reference = reference; - return this; - } + @SerializedName("on_session") + ON_SESSION("on_session"); - /** Required. The suffix of the bank account number. */ - public Builder setSuffix(String suffix) { - this.suffix = suffix; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Required. The suffix of the bank account number. */ - public Builder setSuffix(EmptyParam suffix) { - this.suffix = suffix; - return this; + SetupFutureUsage(String value) { + this.value = value; } } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Oxxo { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Oxxo(Map extraParams) { - this.extraParams = extraParams; - } - public static Builder builder() { - return new Builder(); - } + public enum VerificationMethod implements ApiRequestParams.EnumParam { + @SerializedName("automatic") + AUTOMATIC("automatic"), - public static class Builder { - private Map extraParams; + @SerializedName("instant") + INSTANT("instant"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Oxxo build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Oxxo(this.extraParams); - } + @SerializedName("microdeposits") + MICRODEPOSITS("microdeposits"); - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Oxxo#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Oxxo#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + VerificationMethod(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class P24 { - /** The customer's bank. */ - @SerializedName("bank") - Bank bank; + public static class Affirm { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; /** * Map of extra parameters for custom features not available in this client library. The @@ -12332,9 +23442,45 @@ public static class P24 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private P24(Bank bank, Map extraParams) { - this.bank = bank; + /** Preferred language of the Affirm authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + Object preferredLocale; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Affirm( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + Object preferredLocale, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; + this.preferredLocale = preferredLocale; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -12342,26 +23488,56 @@ public static Builder builder() { } public static class Builder { - private Bank bank; + private ApiRequestParams.EnumParam captureMethod; private Map extraParams; + private Object preferredLocale; + + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.P24 build() { - return new PaymentIntentUpdateParams.PaymentMethodData.P24(this.bank, this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.Affirm build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Affirm( + this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); } - /** The customer's bank. */ - public Builder setBank(PaymentIntentUpdateParams.PaymentMethodData.P24.Bank bank) { - this.bank = bank; + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.P24#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Affirm#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12374,8 +23550,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.P24#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Affirm#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12384,91 +23560,75 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - - public enum Bank implements ApiRequestParams.EnumParam { - @SerializedName("alior_bank") - ALIOR_BANK("alior_bank"), - - @SerializedName("bank_millennium") - BANK_MILLENNIUM("bank_millennium"), - - @SerializedName("bank_nowy_bfg_sa") - BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), - @SerializedName("bank_pekao_sa") - BANK_PEKAO_SA("bank_pekao_sa"), - - @SerializedName("banki_spbdzielcze") - BANKI_SPBDZIELCZE("banki_spbdzielcze"), - - @SerializedName("blik") - BLIK("blik"), - - @SerializedName("bnp_paribas") - BNP_PARIBAS("bnp_paribas"), - - @SerializedName("boz") - BOZ("boz"), - - @SerializedName("citi_handlowy") - CITI_HANDLOWY("citi_handlowy"), - - @SerializedName("credit_agricole") - CREDIT_AGRICOLE("credit_agricole"), - - @SerializedName("envelobank") - ENVELOBANK("envelobank"), - - @SerializedName("etransfer_pocztowy24") - ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), - - @SerializedName("getin_bank") - GETIN_BANK("getin_bank"), - - @SerializedName("ideabank") - IDEABANK("ideabank"), - - @SerializedName("ing") - ING("ing"), - - @SerializedName("inteligo") - INTELIGO("inteligo"), - - @SerializedName("mbank_mtransfer") - MBANK_MTRANSFER("mbank_mtransfer"), - - @SerializedName("nest_przelew") - NEST_PRZELEW("nest_przelew"), - - @SerializedName("noble_pay") - NOBLE_PAY("noble_pay"), - - @SerializedName("pbac_z_ipko") - PBAC_Z_IPKO("pbac_z_ipko"), + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale(String preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } - @SerializedName("plus_bank") - PLUS_BANK("plus_bank"), + /** + * Preferred language of the Affirm authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale(EmptyParam preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } - @SerializedName("santander_przelew24") - SANTANDER_PRZELEW24("santander_przelew24"), + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Affirm.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } - @SerializedName("tmobile_usbugi_bankowe") - TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - @SerializedName("toyota_bank") - TOYOTA_BANK("toyota_bank"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("velobank") - VELOBANK("velobank"), + CaptureMethod(String value) { + this.value = value; + } + } - @SerializedName("volkswagen_bank") - VOLKSWAGEN_BANK("volkswagen_bank"); + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); @Getter(onMethod_ = {@Override}) private final String value; - Bank(String value) { + SetupFutureUsage(String value) { this.value = value; } } @@ -12476,7 +23636,20 @@ public enum Bank implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class PayByBank { + public static class AfterpayClearpay { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12486,27 +23659,108 @@ public static class PayByBank { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PayByBank(Map extraParams) { + /** + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. + */ + @SerializedName("reference") + Object reference; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private AfterpayClearpay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + Object reference, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; + this.reference = reference; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { return new Builder(); } - public static class Builder { - private Map extraParams; + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private Object reference; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay( + this.captureMethod, this.extraParams, this.reference, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.PayByBank build() { - return new PaymentIntentUpdateParams.PaymentMethodData.PayByBank(this.extraParams); + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for - * the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12519,8 +23773,9 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for - * the field documentation. + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12529,12 +23784,87 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Payco { + 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. @@ -12544,8 +23874,35 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(Map extraParams) { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Alipay(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -12555,16 +23912,19 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Payco build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Payco(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.Alipay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Alipay( + this.extraParams, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payco#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12577,8 +23937,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payco#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alipay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12587,12 +23947,100 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Alipay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Paynow { + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alma { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12602,7 +24050,8 @@ public static class Paynow { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paynow(Map extraParams) { + private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; this.extraParams = extraParams; } @@ -12611,17 +24060,51 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Paynow build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Paynow(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.Alma build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Alma( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paynow#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alma#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12635,7 +24118,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paynow#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alma#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12646,11 +24129,36 @@ public Builder putAllExtraParam(Map map) { return this; } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Paypal { + public static class AmazonPay { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12660,8 +24168,35 @@ public static class Paypal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paypal(Map extraParams) { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private AmazonPay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -12669,18 +24204,54 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + private Map extraParams; + private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Paypal build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Paypal(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypal#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12693,8 +24264,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypal#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12703,78 +24274,91 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Paypay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } - private Paypay(Map extraParams) { - this.extraParams = extraParams; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } - public static Builder builder() { - return new Builder(); - } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - public static class Builder { - private Map extraParams; + @Getter(onMethod_ = {@Override}) + private final String value; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Paypay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Paypay(this.extraParams); + CaptureMethod(String value) { + this.value = value; } + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + SetupFutureUsage(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Payto { - /** The account number for the bank account. */ - @SerializedName("account_number") - Object accountNumber; - - /** Bank-State-Branch number of the bank account. */ - @SerializedName("bsb_number") - Object bsbNumber; - + public static class AuBecsDebit { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12784,16 +24368,47 @@ public static class Payto { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The PayID alias for the bank account. */ - @SerializedName("pay_id") - Object payId; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; - private Payto( - Object accountNumber, Object bsbNumber, Map extraParams, Object payId) { - this.accountNumber = accountNumber; - this.bsbNumber = bsbNumber; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + + private AuBecsDebit( + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; - this.payId = payId; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -12801,49 +24416,23 @@ public static Builder builder() { } public static class Builder { - private Object accountNumber; - - private Object bsbNumber; - private Map extraParams; - private Object payId; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Payto build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Payto( - this.accountNumber, this.bsbNumber, this.extraParams, this.payId); - } - - /** The account number for the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** The account number for the bank account. */ - public Builder setAccountNumber(EmptyParam accountNumber) { - this.accountNumber = accountNumber; - return this; - } + private ApiRequestParams.EnumParam setupFutureUsage; - /** Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(String bsbNumber) { - this.bsbNumber = bsbNumber; - return this; - } + private Object targetDate; - /** Bank-State-Branch number of the bank account. */ - public Builder setBsbNumber(EmptyParam bsbNumber) { - this.bsbNumber = bsbNumber; - return this; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit( + this.extraParams, this.setupFutureUsage, this.targetDate); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payto#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12856,8 +24445,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payto#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12867,23 +24456,109 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The PayID alias for the bank account. */ - public Builder setPayId(String payId) { - this.payId = payId; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } - /** The PayID alias for the bank account. */ - public Builder setPayId(EmptyParam payId) { - this.payId = payId; + /** + * 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; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; return this; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Pix { + public static class BacsDebit { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12893,8 +24568,53 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Pix(Map extraParams) { + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + + private BacsDebit( + Map extraParams, + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -12904,16 +24624,23 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private MandateOptions mandateOptions; + + private ApiRequestParams.EnumParam setupFutureUsage; + + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Pix build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Pix(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit( + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Pix#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12926,8 +24653,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Pix#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12936,23 +24663,259 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.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; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special characters: + * '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + @SerializedName("reference_prefix") + Object referencePrefix; + + private MandateOptions(Map extraParams, Object referencePrefix) { + this.extraParams = extraParams; + this.referencePrefix = referencePrefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object referencePrefix; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions( + this.extraParams, this.referencePrefix); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special + * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + public Builder setReferencePrefix(String referencePrefix) { + this.referencePrefix = referencePrefix; + return this; + } + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special + * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + */ + public Builder setReferencePrefix(EmptyParam referencePrefix) { + this.referencePrefix = referencePrefix; + return this; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Promptpay { + 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; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + */ + @SerializedName("preferred_language") + PreferredLanguage preferredLanguage; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; - private Promptpay(Map extraParams) { + private Bancontact( + Map extraParams, + PreferredLanguage preferredLanguage, + ApiRequestParams.EnumParam setupFutureUsage) { this.extraParams = extraParams; + this.preferredLanguage = preferredLanguage; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -12962,16 +24925,21 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private PreferredLanguage preferredLanguage; + + private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Promptpay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Promptpay(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact( + this.extraParams, this.preferredLanguage, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Promptpay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12984,8 +24952,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Promptpay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12994,12 +24962,132 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected + * to. + */ + public Builder setPreferredLanguage( + PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact.PreferredLanguage + preferredLanguage) { + this.preferredLanguage = preferredLanguage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum PreferredLanguage implements ApiRequestParams.EnumParam { + @SerializedName("de") + DE("de"), + + @SerializedName("en") + EN("en"), + + @SerializedName("fr") + FR("fr"), + + @SerializedName("nl") + NL("nl"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLanguage(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Qris { + public static class Billie { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -13009,7 +25097,8 @@ public static class Qris { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Qris(Map extraParams) { + private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; this.extraParams = extraParams; } @@ -13018,18 +25107,52 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Qris build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Qris(this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.Billie build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Billie( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Qris#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Billie#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -13042,8 +25165,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Qris#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Billie#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -13053,11 +25176,30 @@ public Builder putAllExtraParam(Map map) { return this; } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class RadarOptions { + public static class Blik { + /** + * The 6-digit BLIK code that a customer has generated using their banking application. Can + * only be set on confirmation. + */ + @SerializedName("code") + Object code; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -13068,16 +25210,38 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of - * the browser metadata and device details that help Radar make more accurate predictions on - * your payments. + * 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("session") - Object session; + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; - private RadarOptions(Map extraParams, Object session) { + private Blik( + Object code, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.code = code; this.extraParams = extraParams; - this.session = session; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -13085,21 +25249,41 @@ public static Builder builder() { } public static class Builder { + private Object code; + private Map extraParams; - private Object session; + private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.RadarOptions build() { - return new PaymentIntentUpdateParams.PaymentMethodData.RadarOptions( - this.extraParams, this.session); + public PaymentIntentUpdateParams.PaymentMethodOptions.Blik build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Blik( + this.code, this.extraParams, this.setupFutureUsage); + } + + /** + * The 6-digit BLIK code that a customer has generated using their banking application. Can + * only be set on confirmation. + */ + public Builder setCode(String code) { + this.code = code; + return this; + } + + /** + * The 6-digit BLIK code that a customer has generated using their banking application. Can + * only be set on confirmation. + */ + public Builder setCode(EmptyParam code) { + this.code = code; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.RadarOptions#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Blik#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -13112,8 +25296,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.RadarOptions#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Blik#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -13124,33 +25308,88 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot - * of the browser metadata and device details that help Radar make more accurate predictions - * on your payments. + * 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 setSession(String session) { - this.session = session; + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Blik.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * A Radar Session is a snapshot - * of the browser metadata and device details that help Radar make more accurate predictions - * on your payments. + * 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 setSession(EmptyParam session) { - this.session = session; + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Rechnung { - /** Required. Customer's date of birth */ - @SerializedName("dob") - Dob dob; + public static class Boleto { + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a + * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will + * expire on Wednesday at 23:59 America/Sao_Paulo time. + */ + @SerializedName("expires_after_days") + Long expiresAfterDays; /** * Map of extra parameters for custom features not available in this client library. The @@ -13161,9 +25400,39 @@ public static class Rechnung { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Rechnung(Dob dob, Map extraParams) { - this.dob = dob; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Boleto( + Long expiresAfterDays, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.expiresAfterDays = expiresAfterDays; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -13171,27 +25440,33 @@ public static Builder builder() { } public static class Builder { - private Dob dob; + private Long expiresAfterDays; private Map extraParams; + private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Rechnung build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Rechnung( - this.dob, this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.Boleto build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Boleto( + this.expiresAfterDays, this.extraParams, this.setupFutureUsage); } - /** Required. Customer's date of birth */ - public Builder setDob(PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob dob) { - this.dob = dob; + /** + * The number of calendar days before a Boleto voucher expires. For example, if you create a + * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will + * expire on Wednesday at 23:59 America/Sao_Paulo time. + */ + public Builder setExpiresAfterDays(Long expiresAfterDays) { + this.expiresAfterDays = expiresAfterDays; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Rechnung#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Boleto#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -13204,8 +25479,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Rechnung#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Boleto#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -13214,111 +25489,111 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Dob { - /** Required. The day of birth, between 1 and 31. */ - @SerializedName("day") - Long day; /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. + * 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(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Required. The month of birth, between 1 and 12. */ - @SerializedName("month") - Long month; - - /** Required. The four-digit year of birth. */ - @SerializedName("year") - Long year; - - private Dob(Long day, Map extraParams, Long month, Long year) { - this.day = day; - this.extraParams = extraParams; - this.month = month; - this.year = year; + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Boleto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; } - public static Builder builder() { - return new Builder(); + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; } + } - public static class Builder { - private Long day; - - private Map extraParams; - - private Long month; - - private Long year; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob( - this.day, this.extraParams, this.month, this.year); - } - - /** Required. The day of birth, between 1 and 31. */ - public Builder setDay(Long day) { - this.day = day; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Rechnung.Dob#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("on_session") + ON_SESSION("on_session"); - /** Required. The month of birth, between 1 and 12. */ - public Builder setMonth(Long month) { - this.month = month; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Required. The four-digit year of birth. */ - public Builder setYear(Long year) { - this.year = year; - return this; - } + SetupFutureUsage(String value) { + this.value = value; } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class RevolutPay { + public static class Card { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, the + * CVC value will be verified during the card payment attempt. This parameter can only be + * provided during confirmation. + */ + @SerializedName("cvc_token") + Object cvcToken; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -13328,8 +25603,198 @@ public static class RevolutPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private RevolutPay(Map extraParams) { + /** + * Installment configuration for payments attempted on this PaymentIntent. + * + *

For more information, see the installments integration guide. + */ + @SerializedName("installments") + Installments installments; + + /** Configuration options for setting up an eMandate for cards issued in India. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail + * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided + * during confirmation. + */ + @SerializedName("moto") + Boolean moto; + + /** + * Selected network to process this PaymentIntent on. Depends on the available networks of the + * card attached to the PaymentIntent. Can be only set confirm-time. + */ + @SerializedName("network") + Network network; + + /** + * Request ability to decrement the + * authorization for this PaymentIntent. + */ + @SerializedName("request_decremental_authorization") + RequestDecrementalAuthorization requestDecrementalAuthorization; + + /** + * Request ability to capture beyond the standard + * authorization validity window for this PaymentIntent. + */ + @SerializedName("request_extended_authorization") + RequestExtendedAuthorization requestExtendedAuthorization; + + /** + * Request ability to increment the + * authorization for this PaymentIntent. + */ + @SerializedName("request_incremental_authorization") + RequestIncrementalAuthorization requestIncrementalAuthorization; + + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + @SerializedName("request_multicapture") + RequestMulticapture requestMulticapture; + + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + @SerializedName("request_overcapture") + RequestOvercapture requestOvercapture; + + /** Request partial authorization on this PaymentIntent. */ + @SerializedName("request_partial_authorization") + RequestPartialAuthorization requestPartialAuthorization; + + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your + * customers for authentication based on risk level and other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. If not provided, this value defaults to {@code automatic}. Read our + * guide on manually + * requesting 3D Secure for more information on how this configuration interacts with + * Radar and our SCA Engine. + */ + @SerializedName("request_three_d_secure") + RequestThreeDSecure requestThreeDSecure; + + /** + * When enabled, using a card that is attached to a customer will require the CVC to be + * provided again (i.e. using the cvc_token parameter). + */ + @SerializedName("require_cvc_recollection") + Boolean requireCvcRecollection; + + /** + * 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; + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor + * that’s set on the account to form the complete statement descriptor. Maximum 22 characters. + * On card statements, the concatenation of both prefix and suffix (including + * separators) will appear truncated to 22 characters. + */ + @SerializedName("statement_descriptor_suffix_kana") + Object statementDescriptorSuffixKana; + + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 + * characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + @SerializedName("statement_descriptor_suffix_kanji") + Object statementDescriptorSuffixKanji; + + /** + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. + */ + @SerializedName("statement_details") + Object statementDetails; + + /** + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. + */ + @SerializedName("three_d_secure") + ThreeDSecure threeDSecure; + + private Card( + ApiRequestParams.EnumParam captureMethod, + Object cvcToken, + Map extraParams, + Installments installments, + MandateOptions mandateOptions, + Boolean moto, + Network network, + RequestDecrementalAuthorization requestDecrementalAuthorization, + RequestExtendedAuthorization requestExtendedAuthorization, + RequestIncrementalAuthorization requestIncrementalAuthorization, + RequestMulticapture requestMulticapture, + RequestOvercapture requestOvercapture, + RequestPartialAuthorization requestPartialAuthorization, + RequestThreeDSecure requestThreeDSecure, + Boolean requireCvcRecollection, + ApiRequestParams.EnumParam setupFutureUsage, + Object statementDescriptorSuffixKana, + Object statementDescriptorSuffixKanji, + Object statementDetails, + ThreeDSecure threeDSecure) { + this.captureMethod = captureMethod; + this.cvcToken = cvcToken; this.extraParams = extraParams; + this.installments = installments; + this.mandateOptions = mandateOptions; + this.moto = moto; + this.network = network; + this.requestDecrementalAuthorization = requestDecrementalAuthorization; + this.requestExtendedAuthorization = requestExtendedAuthorization; + this.requestIncrementalAuthorization = requestIncrementalAuthorization; + this.requestMulticapture = requestMulticapture; + this.requestOvercapture = requestOvercapture; + this.requestPartialAuthorization = requestPartialAuthorization; + this.requestThreeDSecure = requestThreeDSecure; + this.requireCvcRecollection = requireCvcRecollection; + this.setupFutureUsage = setupFutureUsage; + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; + this.statementDetails = statementDetails; + this.threeDSecure = threeDSecure; } public static Builder builder() { @@ -13337,200 +25802,127 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Object cvcToken; + private Map extraParams; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.RevolutPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.RevolutPay(this.extraParams); - } + private Installments installments; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.RevolutPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private MandateOptions mandateOptions; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.RevolutPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + private Boolean moto; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class SamsungPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Network network; - private SamsungPay(Map extraParams) { - this.extraParams = extraParams; - } + private RequestDecrementalAuthorization requestDecrementalAuthorization; - public static Builder builder() { - return new Builder(); - } + private RequestExtendedAuthorization requestExtendedAuthorization; - public static class Builder { - private Map extraParams; + private RequestIncrementalAuthorization requestIncrementalAuthorization; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.SamsungPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.SamsungPay(this.extraParams); - } + private RequestMulticapture requestMulticapture; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.SamsungPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private RequestOvercapture requestOvercapture; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.SamsungPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + private RequestPartialAuthorization requestPartialAuthorization; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Satispay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 RequestThreeDSecure requestThreeDSecure; - private Satispay(Map extraParams) { - this.extraParams = extraParams; - } + private Boolean requireCvcRecollection; - public static Builder builder() { - return new Builder(); - } + private ApiRequestParams.EnumParam setupFutureUsage; - public static class Builder { - private Map extraParams; + private Object statementDescriptorSuffixKana; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Satispay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Satispay(this.extraParams); - } + private Object statementDescriptorSuffixKanji; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Satispay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; + private Object statementDetails; + + private ThreeDSecure threeDSecure; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card( + this.captureMethod, + this.cvcToken, + this.extraParams, + this.installments, + this.mandateOptions, + this.moto, + this.network, + this.requestDecrementalAuthorization, + this.requestExtendedAuthorization, + this.requestIncrementalAuthorization, + this.requestMulticapture, + this.requestOvercapture, + this.requestPartialAuthorization, + this.requestThreeDSecure, + this.requireCvcRecollection, + this.setupFutureUsage, + this.statementDescriptorSuffixKana, + this.statementDescriptorSuffixKanji, + this.statementDetails, + this.threeDSecure); } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Satispay#extraParams} for the - * field documentation. + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class SepaDebit { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Required. IBAN of the bank account. */ - @SerializedName("iban") - Object iban; - - private SepaDebit(Map extraParams, Object iban) { - this.extraParams = extraParams; - this.iban = iban; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - private Object iban; + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.SepaDebit build() { - return new PaymentIntentUpdateParams.PaymentMethodData.SepaDebit( - this.extraParams, this.iban); + /** + * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, + * the CVC value will be verified during the card payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setCvcToken(String cvcToken) { + this.cvcToken = cvcToken; + return this; + } + + /** + * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, + * the CVC value will be verified during the card payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setCvcToken(EmptyParam cvcToken) { + this.cvcToken = cvcToken; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.SepaDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -13543,8 +25935,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.SepaDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Card#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -13554,2761 +25946,3109 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. IBAN of the bank account. */ - public Builder setIban(String iban) { - this.iban = iban; + /** + * Installment configuration for payments attempted on this PaymentIntent. + * + *

For more information, see the installments integration guide. + */ + public Builder setInstallments( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments installments) { + this.installments = installments; return this; } - /** Required. IBAN of the bank account. */ - public Builder setIban(EmptyParam iban) { - this.iban = iban; + /** Configuration options for setting up an eMandate for cards issued in India. */ + public Builder setMandateOptions( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; return this; } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Shopeepay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Shopeepay(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - public static class Builder { - private Map extraParams; + /** + * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail + * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided + * during confirmation. + */ + public Builder setMoto(Boolean moto) { + this.moto = moto; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Shopeepay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Shopeepay(this.extraParams); + /** + * Selected network to process this PaymentIntent on. Depends on the available networks of + * the card attached to the PaymentIntent. Can be only set confirm-time. + */ + public Builder setNetwork( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.Network network) { + this.network = network; + return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Shopeepay#extraParams} for - * the field documentation. + * Request ability to decrement the + * authorization for this PaymentIntent. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setRequestDecrementalAuthorization( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization + requestDecrementalAuthorization) { + this.requestDecrementalAuthorization = requestDecrementalAuthorization; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Shopeepay#extraParams} for - * the field documentation. + * Request ability to capture beyond the + * standard authorization validity window for this PaymentIntent. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setRequestExtendedAuthorization( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestExtendedAuthorization + requestExtendedAuthorization) { + this.requestExtendedAuthorization = requestExtendedAuthorization; return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Sofort { - /** - * Required. Two-letter ISO code representing the country the bank account is - * located in. - */ - @SerializedName("country") - Country country; + /** + * Request ability to increment the + * authorization for this PaymentIntent. + */ + public Builder setRequestIncrementalAuthorization( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization + requestIncrementalAuthorization) { + this.requestIncrementalAuthorization = requestIncrementalAuthorization; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Request ability to make multiple + * captures for this PaymentIntent. + */ + public Builder setRequestMulticapture( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestMulticapture + requestMulticapture) { + this.requestMulticapture = requestMulticapture; + return this; + } - private Sofort(Country country, Map extraParams) { - this.country = country; - this.extraParams = extraParams; - } + /** + * Request ability to overcapture + * for this PaymentIntent. + */ + public Builder setRequestOvercapture( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestOvercapture + requestOvercapture) { + this.requestOvercapture = requestOvercapture; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Request partial authorization on this PaymentIntent. */ + public Builder setRequestPartialAuthorization( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestPartialAuthorization + requestPartialAuthorization) { + this.requestPartialAuthorization = requestPartialAuthorization; + return this; + } - public static class Builder { - private Country country; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your + * customers for authentication based on risk level and other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. If not provided, this value defaults to {@code automatic}. Read our + * guide on manually + * requesting 3D Secure for more information on how this configuration interacts with + * Radar and our SCA Engine. + */ + public Builder setRequestThreeDSecure( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestThreeDSecure + requestThreeDSecure) { + this.requestThreeDSecure = requestThreeDSecure; + return this; + } - private Map extraParams; + /** + * When enabled, using a card that is attached to a customer will require the CVC to be + * provided again (i.e. using the cvc_token parameter). + */ + public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { + this.requireCvcRecollection = requireCvcRecollection; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Sofort build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Sofort( - this.country, this.extraParams); + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; } /** - * Required. Two-letter ISO code representing the country the bank account - * is located in. + * 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 setCountry( - PaymentIntentUpdateParams.PaymentMethodData.Sofort.Country country) { - this.country = country; + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Sofort#extraParams} for the - * field documentation. + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 22 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 22 characters. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setStatementDescriptorSuffixKana(String statementDescriptorSuffixKana) { + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Sofort#extraParams} for the - * field documentation. + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 22 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 22 characters. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setStatementDescriptorSuffixKana(EmptyParam statementDescriptorSuffixKana) { + this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; return this; } - } - - public enum Country implements ApiRequestParams.EnumParam { - @SerializedName("AT") - AT("AT"), - - @SerializedName("BE") - BE("BE"), - - @SerializedName("DE") - DE("DE"), - - @SerializedName("ES") - ES("ES"), - - @SerializedName("IT") - IT("IT"), - - @SerializedName("NL") - NL("NL"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - Country(String value) { - this.value = value; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class StripeBalance { - /** The connected account ID whose Stripe balance to use as the source of payment. */ - @SerializedName("account") - Object account; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 source_type - * of the balance - */ - @SerializedName("source_type") - SourceType sourceType; - - private StripeBalance( - Object account, Map extraParams, SourceType sourceType) { - this.account = account; - this.extraParams = extraParams; - this.sourceType = sourceType; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Object account; - - private Map extraParams; - - private SourceType sourceType; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.StripeBalance build() { - return new PaymentIntentUpdateParams.PaymentMethodData.StripeBalance( - this.account, this.extraParams, this.sourceType); - } - /** The connected account ID whose Stripe balance to use as the source of payment. */ - public Builder setAccount(String account) { - this.account = account; + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 17 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + public Builder setStatementDescriptorSuffixKanji(String statementDescriptorSuffixKanji) { + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; return this; } - /** The connected account ID whose Stripe balance to use as the source of payment. */ - public Builder setAccount(EmptyParam account) { - this.account = account; + /** + * Provides information about a card payment that customers see on their statements. + * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement + * descriptor that’s set on the account to form the complete statement descriptor. Maximum + * 17 characters. On card statements, the concatenation of both prefix and suffix + * (including separators) will appear truncated to 17 characters. + */ + public Builder setStatementDescriptorSuffixKanji( + EmptyParam statementDescriptorSuffixKanji) { + this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.StripeBalance#extraParams} - * for the field documentation. + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + public Builder setStatementDetails( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails statementDetails) { + this.statementDetails = statementDetails; return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.StripeBalance#extraParams} - * for the field documentation. + * Statement details for this payment intent. You can use this to override the merchant + * details shown on your customers' statements. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + public Builder setStatementDetails(EmptyParam statementDetails) { + this.statementDetails = statementDetails; return this; } /** - * The source_type - * of the balance + * If 3D Secure authentication was performed with a third-party provider, the authentication + * details to use for this payment. */ - public Builder setSourceType( - PaymentIntentUpdateParams.PaymentMethodData.StripeBalance.SourceType sourceType) { - this.sourceType = sourceType; + public Builder setThreeDSecure( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { + this.threeDSecure = threeDSecure; return this; } } - public enum SourceType implements ApiRequestParams.EnumParam { - @SerializedName("bank_account") - BANK_ACCOUNT("bank_account"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Installments { + /** + * Setting to true enables installments for this PaymentIntent. This will cause the response + * to contain a list of available installment plans. Setting to false will prevent any + * selected plan from applying to a charge. + */ + @SerializedName("enabled") + Boolean enabled; - @SerializedName("card") - CARD("card"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("fpx") - FPX("fpx"); + /** + * The selected installment plan to use for this payment attempt. This parameter can only be + * provided during confirmation. + */ + @SerializedName("plan") + Object plan; - @Getter(onMethod_ = {@Override}) - private final String value; + private Installments(Boolean enabled, Map extraParams, Object plan) { + this.enabled = enabled; + this.extraParams = extraParams; + this.plan = plan; + } - SourceType(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Swish { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Boolean enabled; + + private Map extraParams; - private Swish(Map extraParams) { - this.extraParams = extraParams; - } + private Object plan; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments( + this.enabled, this.extraParams, this.plan); + } - public static class Builder { - private Map extraParams; + /** + * Setting to true enables installments for this PaymentIntent. This will cause the + * response to contain a list of available installment plans. Setting to false will + * prevent any selected plan from applying to a charge. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Swish build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Swish(this.extraParams); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Swish#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Swish#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * The selected installment plan to use for this payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setPlan( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan plan) { + this.plan = plan; + return this; } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Twint { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * The selected installment plan to use for this payment attempt. This parameter can only + * be provided during confirmation. + */ + public Builder setPlan(EmptyParam plan) { + this.plan = plan; + return this; + } + } - private Twint(Map extraParams) { - this.extraParams = extraParams; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Plan { + /** + * For {@code fixed_count} installment plans, this is required. It represents the number + * of installment payments your customer will make to their credit card. + */ + @SerializedName("count") + Long count; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** + * For {@code fixed_count} installment plans, this is required. It represents the interval + * between installment payments your customer will make to their credit card. One of + * {@code month}. + */ + @SerializedName("interval") + Interval interval; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Twint build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Twint(this.extraParams); - } + /** + * Required. Type of installment plan, one of {@code fixed_count}, {@code + * bonus}, or {@code revolving}. + */ + @SerializedName("type") + Type type; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Twint#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Plan(Long count, Map extraParams, Interval interval, Type type) { + this.count = count; + this.extraParams = extraParams; + this.interval = interval; + this.type = type; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Twint#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class UsBankAccount { - /** Account holder type: individual or company. */ - @SerializedName("account_holder_type") - AccountHolderType accountHolderType; - /** Account number of the bank account. */ - @SerializedName("account_number") - Object accountNumber; + public static class Builder { + private Long count; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - @SerializedName("account_type") - AccountType accountType; + private Map extraParams; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Interval interval; - /** The ID of a Financial Connections Account to use as a payment method. */ - @SerializedName("financial_connections_account") - Object financialConnectionsAccount; + private Type type; - /** Routing number of the bank account. */ - @SerializedName("routing_number") - Object routingNumber; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan( + this.count, this.extraParams, this.interval, this.type); + } - private UsBankAccount( - AccountHolderType accountHolderType, - Object accountNumber, - AccountType accountType, - Map extraParams, - Object financialConnectionsAccount, - Object routingNumber) { - this.accountHolderType = accountHolderType; - this.accountNumber = accountNumber; - this.accountType = accountType; - this.extraParams = extraParams; - this.financialConnectionsAccount = financialConnectionsAccount; - this.routingNumber = routingNumber; - } + /** + * For {@code fixed_count} installment plans, this is required. It represents the number + * of installment payments your customer will make to their credit card. + */ + public Builder setCount(Long count) { + this.count = count; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - public static class Builder { - private AccountHolderType accountHolderType; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private Object accountNumber; + /** + * For {@code fixed_count} installment plans, this is required. It represents the + * interval between installment payments your customer will make to their credit card. + * One of {@code month}. + */ + public Builder setInterval( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan.Interval + interval) { + this.interval = interval; + return this; + } - private AccountType accountType; + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ + public Builder setType( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { + this.type = type; + return this; + } + } - private Map extraParams; + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("month") + MONTH("month"); - private Object financialConnectionsAccount; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object routingNumber; + Interval(String value) { + this.value = value; + } + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount build() { - return new PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount( - this.accountHolderType, - this.accountNumber, - this.accountType, - this.extraParams, - this.financialConnectionsAccount, - this.routingNumber); - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), - /** Account holder type: individual or company. */ - public Builder setAccountHolderType( - PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount.AccountHolderType - accountHolderType) { - this.accountHolderType = accountHolderType; - return this; - } + @SerializedName("fixed_count") + FIXED_COUNT("fixed_count"), - /** Account number of the bank account. */ - public Builder setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + @SerializedName("revolving") + REVOLVING("revolving"); - /** Account number of the bank account. */ - public Builder setAccountNumber(EmptyParam accountNumber) { - this.accountNumber = accountNumber; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Account type: checkings or savings. Defaults to checking if omitted. */ - public Builder setAccountType( - PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount.AccountType accountType) { - this.accountType = accountType; - return this; + Type(String value) { + this.value = value; + } + } } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Required. Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount#extraParams} - * for the field documentation. + * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, the + * {@code amount} param refers to the exact amount to be charged in future payments. If + * {@code maximum}, the amount charged can be up to the value passed for the {@code amount} + * param. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("amount_type") + AmountType amountType; /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.UsBankAccount#extraParams} - * for the field documentation. + * A description of the mandate or subscription that is meant to be displayed to the + * customer. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** The ID of a Financial Connections Account to use as a payment method. */ - public Builder setFinancialConnectionsAccount(String financialConnectionsAccount) { - this.financialConnectionsAccount = financialConnectionsAccount; - return this; - } - - /** The ID of a Financial Connections Account to use as a payment method. */ - public Builder setFinancialConnectionsAccount(EmptyParam financialConnectionsAccount) { - this.financialConnectionsAccount = financialConnectionsAccount; - return this; - } - - /** Routing number of the bank account. */ - public Builder setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - return this; - } + @SerializedName("description") + Object description; - /** Routing number of the bank account. */ - public Builder setRoutingNumber(EmptyParam routingNumber) { - this.routingNumber = routingNumber; - return this; - } - } + /** + * End date of the mandate or subscription. If not provided, the mandate will be active + * until canceled. If provided, end date should be after start date. + */ + @SerializedName("end_date") + Long endDate; - public enum AccountHolderType implements ApiRequestParams.EnumParam { - @SerializedName("company") - COMPANY("company"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("individual") - INDIVIDUAL("individual"); + /** + * Required. Specifies payment frequency. One of {@code day}, {@code week}, + * {@code month}, {@code year}, or {@code sporadic}. + */ + @SerializedName("interval") + Interval interval; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * The number of intervals between payments. For example, {@code interval=month} and {@code + * interval_count=3} indicates one payment every three months. Maximum of one year interval + * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code + * interval=sporadic}. + */ + @SerializedName("interval_count") + Long intervalCount; - AccountHolderType(String value) { - this.value = value; - } - } + /** Required. Unique identifier for the mandate or subscription. */ + @SerializedName("reference") + Object reference; - public enum AccountType implements ApiRequestParams.EnumParam { - @SerializedName("checking") - CHECKING("checking"), + /** + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. + */ + @SerializedName("start_date") + Long startDate; - @SerializedName("savings") - SAVINGS("savings"); + /** Specifies the type of mandates supported. Possible values are {@code india}. */ + @SerializedName("supported_types") + List + supportedTypes; - @Getter(onMethod_ = {@Override}) - private final String value; + private MandateOptions( + Long amount, + AmountType amountType, + Object description, + Long endDate, + Map extraParams, + Interval interval, + Long intervalCount, + Object reference, + Long startDate, + List + supportedTypes) { + this.amount = amount; + this.amountType = amountType; + this.description = description; + this.endDate = endDate; + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.reference = reference; + this.startDate = startDate; + this.supportedTypes = supportedTypes; + } - AccountType(String value) { - this.value = value; + public static Builder builder() { + return new Builder(); } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class WechatPay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private Long amount; - private WechatPay(Map extraParams) { - this.extraParams = extraParams; - } + private AmountType amountType; - public static Builder builder() { - return new Builder(); - } + private Object description; - public static class Builder { - private Map extraParams; + private Long endDate; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.WechatPay build() { - return new PaymentIntentUpdateParams.PaymentMethodData.WechatPay(this.extraParams); - } + private Map extraParams; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.WechatPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Interval interval; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.WechatPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } + private Long intervalCount; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Zip { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Object reference; - private Zip(Map extraParams) { - this.extraParams = extraParams; - } + private Long startDate; - public static Builder builder() { - return new Builder(); - } + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> + supportedTypes; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions( + this.amount, + this.amountType, + this.description, + this.endDate, + this.extraParams, + this.interval, + this.intervalCount, + this.reference, + this.startDate, + this.supportedTypes); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodData.Zip build() { - return new PaymentIntentUpdateParams.PaymentMethodData.Zip(this.extraParams); - } + /** Required. Amount to be charged for future payments. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Zip#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, + * the {@code amount} param refers to the exact amount to be charged in future payments. + * If {@code maximum}, the amount charged can be up to the value passed for the {@code + * amount} param. + */ + public Builder setAmountType( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Zip#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(String description) { + this.description = description; + return this; } - this.extraParams.putAll(map); - return this; - } - } - } - public enum AllowRedisplay implements ApiRequestParams.EnumParam { - @SerializedName("always") - ALWAYS("always"), + /** + * A description of the mandate or subscription that is meant to be displayed to the + * customer. + */ + public Builder setDescription(EmptyParam description) { + this.description = description; + return this; + } - @SerializedName("limited") - LIMITED("limited"), + /** + * End date of the mandate or subscription. If not provided, the mandate will be active + * until canceled. If provided, end date should be after start date. + */ + public Builder setEndDate(Long endDate) { + this.endDate = endDate; + return this; + } - @SerializedName("unspecified") - UNSPECIFIED("unspecified"); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - AllowRedisplay(String value) { - this.value = value; - } - } + /** + * Required. Specifies payment frequency. One of {@code day}, {@code + * week}, {@code month}, {@code year}, or {@code sporadic}. + */ + public Builder setInterval( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.Interval + interval) { + this.interval = interval; + return this; + } - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("acss_debit") - ACSS_DEBIT("acss_debit"), + /** + * The number of intervals between payments. For example, {@code interval=month} and + * {@code interval_count=3} indicates one payment every three months. Maximum of one year + * interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when + * {@code interval=sporadic}. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } - @SerializedName("affirm") - AFFIRM("affirm"), + /** Required. Unique identifier for the mandate or subscription. */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } - @SerializedName("afterpay_clearpay") - AFTERPAY_CLEARPAY("afterpay_clearpay"), + /** Required. Unique identifier for the mandate or subscription. */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } - @SerializedName("alipay") - ALIPAY("alipay"), + /** + * Required. Start date of the mandate or subscription. Start date should + * not be lesser than yesterday. + */ + public Builder setStartDate(Long startDate) { + this.startDate = startDate; + return this; + } - @SerializedName("alma") - ALMA("alma"), + /** + * Add an element to `supportedTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for + * the field documentation. + */ + public Builder addSupportedType( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType + element) { + if (this.supportedTypes == null) { + this.supportedTypes = new ArrayList<>(); + } + this.supportedTypes.add(element); + return this; + } - @SerializedName("amazon_pay") - AMAZON_PAY("amazon_pay"), + /** + * Add all elements to `supportedTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for + * the field documentation. + */ + public Builder addAllSupportedType( + List + elements) { + if (this.supportedTypes == null) { + this.supportedTypes = new ArrayList<>(); + } + this.supportedTypes.addAll(elements); + return this; + } + } - @SerializedName("au_becs_debit") - AU_BECS_DEBIT("au_becs_debit"), + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), - @SerializedName("bacs_debit") - BACS_DEBIT("bacs_debit"), + @SerializedName("maximum") + MAXIMUM("maximum"); - @SerializedName("bancontact") - BANCONTACT("bancontact"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("billie") - BILLIE("billie"), + AmountType(String value) { + this.value = value; + } + } - @SerializedName("blik") - BLIK("blik"), + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - @SerializedName("boleto") - BOLETO("boleto"), + @SerializedName("month") + MONTH("month"), - @SerializedName("cashapp") - CASHAPP("cashapp"), + @SerializedName("sporadic") + SPORADIC("sporadic"), - @SerializedName("crypto") - CRYPTO("crypto"), + @SerializedName("week") + WEEK("week"), - @SerializedName("customer_balance") - CUSTOMER_BALANCE("customer_balance"), + @SerializedName("year") + YEAR("year"); - @SerializedName("eps") - EPS("eps"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("fpx") - FPX("fpx"), + Interval(String value) { + this.value = value; + } + } - @SerializedName("giropay") - GIROPAY("giropay"), + public enum SupportedType implements ApiRequestParams.EnumParam { + @SerializedName("india") + INDIA("india"); - @SerializedName("gopay") - GOPAY("gopay"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("grabpay") - GRABPAY("grabpay"), + SupportedType(String value) { + this.value = value; + } + } + } - @SerializedName("id_bank_transfer") - ID_BANK_TRANSFER("id_bank_transfer"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StatementDetails { + /** Please pass in an address that is within your Stripe user account country. */ + @SerializedName("address") + Address address; - @SerializedName("ideal") - IDEAL("ideal"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("kakao_pay") - KAKAO_PAY("kakao_pay"), + /** Phone number (e.g., a toll-free number that customers can call). */ + @SerializedName("phone") + Object phone; - @SerializedName("klarna") - KLARNA("klarna"), + private StatementDetails(Address address, Map extraParams, Object phone) { + this.address = address; + this.extraParams = extraParams; + this.phone = phone; + } - @SerializedName("konbini") - KONBINI("konbini"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("kr_card") - KR_CARD("kr_card"), + public static class Builder { + private Address address; - @SerializedName("link") - LINK("link"), + private Map extraParams; - @SerializedName("mb_way") - MB_WAY("mb_way"), + private Object phone; - @SerializedName("mobilepay") - MOBILEPAY("mobilepay"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails( + this.address, this.extraParams, this.phone); + } - @SerializedName("multibanco") - MULTIBANCO("multibanco"), + /** Please pass in an address that is within your Stripe user account country. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails.Address + address) { + this.address = address; + return this; + } - @SerializedName("naver_pay") - NAVER_PAY("naver_pay"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("nz_bank_account") - NZ_BANK_ACCOUNT("nz_bank_account"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - @SerializedName("oxxo") - OXXO("oxxo"), + /** Phone number (e.g., a toll-free number that customers can call). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } - @SerializedName("p24") - P24("p24"), + /** Phone number (e.g., a toll-free number that customers can call). */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + } - @SerializedName("pay_by_bank") - PAY_BY_BANK("pay_by_bank"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; - @SerializedName("payco") - PAYCO("payco"), + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; - @SerializedName("paynow") - PAYNOW("paynow"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("paypal") - PAYPAL("paypal"), + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; - @SerializedName("paypay") - PAYPAY("paypay"), + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; - @SerializedName("payto") - PAYTO("payto"), + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; - @SerializedName("pix") - PIX("pix"), + /** State, county, province, or region. */ + @SerializedName("state") + Object state; - @SerializedName("promptpay") - PROMPTPAY("promptpay"), + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } - @SerializedName("qris") - QRIS("qris"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("rechnung") - RECHNUNG("rechnung"), + public static class Builder { + private Object city; - @SerializedName("revolut_pay") - REVOLUT_PAY("revolut_pay"), + private Object country; - @SerializedName("samsung_pay") - SAMSUNG_PAY("samsung_pay"), + private Map extraParams; - @SerializedName("satispay") - SATISPAY("satispay"), + private Object line1; - @SerializedName("sepa_debit") - SEPA_DEBIT("sepa_debit"), + private Object line2; - @SerializedName("shopeepay") - SHOPEEPAY("shopeepay"), + private Object postalCode; - @SerializedName("sofort") - SOFORT("sofort"), + private Object state; - @SerializedName("stripe_balance") - STRIPE_BALANCE("stripe_balance"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails + .Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } - @SerializedName("swish") - SWISH("swish"), + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @SerializedName("twint") - TWINT("twint"), + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - @SerializedName("us_bank_account") - US_BANK_ACCOUNT("us_bank_account"), + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - @SerializedName("wechat_pay") - WECHAT_PAY("wechat_pay"), + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - @SerializedName("zip") - ZIP("zip"); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails.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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails.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; + } - Type(String value) { - this.value = value; - } - } - } + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PaymentMethodOptions { - /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the ACSS - * Debit payment method options. - */ - @SerializedName("acss_debit") - Object acssDebit; + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } - /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. - */ - @SerializedName("affirm") - Object affirm; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } - /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. - */ - @SerializedName("afterpay_clearpay") - Object afterpayClearpay; + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } - /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. - */ - @SerializedName("alipay") - Object alipay; + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. - */ - @SerializedName("alma") - Object alma; + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. - */ - @SerializedName("amazon_pay") - Object amazonPay; + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } - /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the AU - * BECS Direct Debit payment method options. - */ - @SerializedName("au_becs_debit") - Object auBecsDebit; + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + } - /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the BACS - * Debit payment method options. - */ - @SerializedName("bacs_debit") - Object bacsDebit; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ThreeDSecure { + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + @SerializedName("ares_trans_status") + AresTransStatus aresTransStatus; - /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. - */ - @SerializedName("bancontact") - Object bancontact; + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + @SerializedName("cryptogram") + Object cryptogram; - /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. - */ - @SerializedName("billie") - Object billie; + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + @SerializedName("electronic_commerce_indicator") + ElectronicCommerceIndicator electronicCommerceIndicator; - /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. - */ - @SerializedName("blik") - Object blik; + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + @SerializedName("exemption_indicator") + ExemptionIndicator exemptionIndicator; - /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. - */ - @SerializedName("boleto") - Object 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; - /** Configuration for any card payments attempted on this PaymentIntent. */ - @SerializedName("card") - Object card; + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + @SerializedName("network_options") + NetworkOptions networkOptions; - /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. - */ - @SerializedName("card_present") - Object cardPresent; + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the + * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + @SerializedName("requestor_challenge_indicator") + Object requestorChallengeIndicator; - /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App - * Pay payment method options. - */ - @SerializedName("cashapp") - Object cashapp; + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + @SerializedName("transaction_id") + Object transactionId; - /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. - */ - @SerializedName("crypto") - Object crypto; + /** Required. The version of 3D Secure that was performed. */ + @SerializedName("version") + Version version; - /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the - * customer balance payment method options. - */ - @SerializedName("customer_balance") - Object customerBalance; + private ThreeDSecure( + AresTransStatus aresTransStatus, + Object cryptogram, + ElectronicCommerceIndicator electronicCommerceIndicator, + ExemptionIndicator exemptionIndicator, + Map extraParams, + NetworkOptions networkOptions, + Object requestorChallengeIndicator, + Object transactionId, + Version version) { + this.aresTransStatus = aresTransStatus; + this.cryptogram = cryptogram; + this.electronicCommerceIndicator = electronicCommerceIndicator; + this.exemptionIndicator = exemptionIndicator; + this.extraParams = extraParams; + this.networkOptions = networkOptions; + this.requestorChallengeIndicator = requestorChallengeIndicator; + this.transactionId = transactionId; + this.version = version; + } - /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS payment - * method options. - */ - @SerializedName("eps") - Object eps; + public static Builder builder() { + return new Builder(); + } - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static class Builder { + private AresTransStatus aresTransStatus; - /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment - * method options. - */ - @SerializedName("fpx") - Object fpx; + private Object cryptogram; - /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay - * payment method options. - */ - @SerializedName("giropay") - Object giropay; + private ElectronicCommerceIndicator electronicCommerceIndicator; - /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. - */ - @SerializedName("gopay") - Object gopay; + private ExemptionIndicator exemptionIndicator; - /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay - * payment method options. - */ - @SerializedName("grabpay") - Object grabpay; + private Map extraParams; - /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the - * Indonesia Bank Transfer payment method options. - */ - @SerializedName("id_bank_transfer") - Object idBankTransfer; + private NetworkOptions networkOptions; - /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. - */ - @SerializedName("ideal") - Object ideal; + private Object requestorChallengeIndicator; - /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. - */ - @SerializedName("interac_present") - Object interacPresent; + private Object transactionId; - /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the Kakao - * Pay payment method options. - */ - @SerializedName("kakao_pay") - Object kakaoPay; + private Version version; - /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. - */ - @SerializedName("klarna") - Object klarna; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure( + this.aresTransStatus, + this.cryptogram, + this.electronicCommerceIndicator, + this.exemptionIndicator, + this.extraParams, + this.networkOptions, + this.requestorChallengeIndicator, + this.transactionId, + this.version); + } - /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the Konbini - * payment method options. - */ - @SerializedName("konbini") - Object konbini; + /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ + public Builder setAresTransStatus( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus + aresTransStatus) { + this.aresTransStatus = aresTransStatus; + return this; + } - /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR Card - * payment method options. - */ - @SerializedName("kr_card") - Object krCard; + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + public Builder setCryptogram(String cryptogram) { + this.cryptogram = cryptogram; + return this; + } - /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - @SerializedName("link") - Object link; + /** + * Required. The cryptogram, also known as the "authentication + * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a + * 28-character string. (Most 3D Secure providers will return the base64-encoded version, + * which is what you should specify here.) + */ + public Builder setCryptogram(EmptyParam cryptogram) { + this.cryptogram = cryptogram; + return this; + } + + /** + * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and + * indicates what degree of authentication was performed. + */ + public Builder setElectronicCommerceIndicator( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure + .ElectronicCommerceIndicator + electronicCommerceIndicator) { + this.electronicCommerceIndicator = electronicCommerceIndicator; + return this; + } - /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. - */ - @SerializedName("mb_way") - Object mbWay; + /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ + public Builder setExemptionIndicator( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.ExemptionIndicator + exemptionIndicator) { + this.exemptionIndicator = exemptionIndicator; + return this; + } - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - @SerializedName("mobilepay") - Object mobilepay; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - @SerializedName("multibanco") - Object multibanco; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the Naver - * Pay payment method options. - */ - @SerializedName("naver_pay") - Object naverPay; + /** + * Network specific 3DS fields. Network specific arguments require an explicit card brand + * choice. The parameter `payment_method_options.card.network`` must be populated + * accordingly + */ + public Builder setNetworkOptions( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + networkOptions) { + this.networkOptions = networkOptions; + return this; + } - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about the - * NZ BECS Direct Debit payment method options. - */ - @SerializedName("nz_bank_account") - Object nzBankAccount; + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - @SerializedName("oxxo") - Object oxxo; + /** + * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in + * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + */ + public Builder setRequestorChallengeIndicator(EmptyParam requestorChallengeIndicator) { + this.requestorChallengeIndicator = requestorChallengeIndicator; + return this; + } - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - @SerializedName("p24") - Object p24; + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + public Builder setTransactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. - */ - @SerializedName("pay_by_bank") - Object payByBank; + /** + * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory + * Server Transaction ID (dsTransID). + */ + public Builder setTransactionId(EmptyParam transactionId) { + this.transactionId = transactionId; + return this; + } - /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. - */ - @SerializedName("payco") - Object payco; + /** Required. The version of 3D Secure that was performed. */ + public Builder setVersion( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { + this.version = version; + return this; + } + } - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - @SerializedName("paynow") - Object paynow; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NetworkOptions { + /** Cartes Bancaires-specific 3DS fields. */ + @SerializedName("cartes_bancaires") + CartesBancaires cartesBancaires; - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - @SerializedName("paypal") - Object paypal; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - @SerializedName("paypay") - Object paypay; + private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { + this.cartesBancaires = cartesBancaires; + this.extraParams = extraParams; + } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - @SerializedName("payto") - Object payto; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment - * method options. - */ - @SerializedName("pix") - Object pix; + public static class Builder { + private CartesBancaires cartesBancaires; - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - @SerializedName("promptpay") - Object promptpay; + private Map extraParams; - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - @SerializedName("qris") - Object qris; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions(this.cartesBancaires, this.extraParams); + } - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - @SerializedName("rechnung") - Object rechnung; + /** Cartes Bancaires-specific 3DS fields. */ + public Builder setCartesBancaires( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + cartesBancaires) { + this.cartesBancaires = cartesBancaires; + return this; + } - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - @SerializedName("revolut_pay") - Object revolutPay; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. - */ - @SerializedName("samsung_pay") - Object samsungPay; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CartesBancaires { + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + @SerializedName("cb_avalgo") + CbAvalgo cbAvalgo; - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - @SerializedName("satispay") - Object satispay; + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + @SerializedName("cb_exemption") + Object cbExemption; - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the SEPA - * Debit payment method options. - */ - @SerializedName("sepa_debit") - Object sepaDebit; + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + @SerializedName("cb_score") + Long cbScore; - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - @SerializedName("shopeepay") - Object shopeepay; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - @SerializedName("sofort") - Object sofort; + private CartesBancaires( + CbAvalgo cbAvalgo, + Object cbExemption, + Long cbScore, + Map extraParams) { + this.cbAvalgo = cbAvalgo; + this.cbExemption = cbExemption; + this.cbScore = cbScore; + this.extraParams = extraParams; + } - /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. - */ - @SerializedName("stripe_balance") - Object stripeBalance; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - @SerializedName("swish") - Object swish; + public static class Builder { + private CbAvalgo cbAvalgo; - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - @SerializedName("twint") - Object twint; + private Object cbExemption; - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the - * US bank account payment method options. - */ - @SerializedName("us_bank_account") - Object usBankAccount; + private Long cbScore; - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - @SerializedName("wechat_pay") - Object wechatPay; + private Map extraParams; - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment - * method options. - */ - @SerializedName("zip") - Object zip; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure + .NetworkOptions.CartesBancaires( + this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + } - private PaymentMethodOptions( - Object acssDebit, - Object affirm, - Object afterpayClearpay, - Object alipay, - Object alma, - Object amazonPay, - Object auBecsDebit, - Object bacsDebit, - Object bancontact, - Object billie, - Object blik, - Object boleto, - Object card, - Object cardPresent, - Object cashapp, - Object crypto, - Object customerBalance, - Object eps, - Map extraParams, - Object fpx, - Object giropay, - Object gopay, - Object grabpay, - Object idBankTransfer, - Object ideal, - Object interacPresent, - Object kakaoPay, - Object klarna, - Object konbini, - Object krCard, - Object link, - Object mbWay, - Object mobilepay, - Object multibanco, - Object naverPay, - Object nzBankAccount, - Object oxxo, - Object p24, - Object payByBank, - Object payco, - Object paynow, - Object paypal, - Object paypay, - Object payto, - Object pix, - Object promptpay, - Object qris, - Object rechnung, - Object revolutPay, - Object samsungPay, - Object satispay, - Object sepaDebit, - Object shopeepay, - Object sofort, - Object stripeBalance, - Object swish, - Object twint, - Object usBankAccount, - Object wechatPay, - Object zip) { - this.acssDebit = acssDebit; - this.affirm = affirm; - this.afterpayClearpay = afterpayClearpay; - this.alipay = alipay; - this.alma = alma; - this.amazonPay = amazonPay; - this.auBecsDebit = auBecsDebit; - this.bacsDebit = bacsDebit; - this.bancontact = bancontact; - this.billie = billie; - this.blik = blik; - this.boleto = boleto; - this.card = card; - this.cardPresent = cardPresent; - this.cashapp = cashapp; - this.crypto = crypto; - this.customerBalance = customerBalance; - this.eps = eps; - this.extraParams = extraParams; - this.fpx = fpx; - this.giropay = giropay; - this.gopay = gopay; - this.grabpay = grabpay; - this.idBankTransfer = idBankTransfer; - this.ideal = ideal; - this.interacPresent = interacPresent; - this.kakaoPay = kakaoPay; - this.klarna = klarna; - this.konbini = konbini; - this.krCard = krCard; - this.link = link; - this.mbWay = mbWay; - this.mobilepay = mobilepay; - this.multibanco = multibanco; - this.naverPay = naverPay; - this.nzBankAccount = nzBankAccount; - this.oxxo = oxxo; - this.p24 = p24; - this.payByBank = payByBank; - this.payco = payco; - this.paynow = paynow; - this.paypal = paypal; - this.paypay = paypay; - this.payto = payto; - this.pix = pix; - this.promptpay = promptpay; - this.qris = qris; - this.rechnung = rechnung; - this.revolutPay = revolutPay; - this.samsungPay = samsungPay; - this.satispay = satispay; - this.sepaDebit = sepaDebit; - this.shopeepay = shopeepay; - this.sofort = sofort; - this.stripeBalance = stripeBalance; - this.swish = swish; - this.twint = twint; - this.usBankAccount = usBankAccount; - this.wechatPay = wechatPay; - this.zip = zip; - } + /** + * Required. The cryptogram calculation algorithm used by the card + * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code + * cavvAlgorithm}. messageExtension: CB-AVALGO + */ + public Builder setCbAvalgo( + PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions + .CartesBancaires.CbAvalgo + cbAvalgo) { + this.cbAvalgo = cbAvalgo; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(String cbExemption) { + this.cbExemption = cbExemption; + return this; + } - public static class Builder { - private Object acssDebit; + /** + * The exemption indicator returned from Cartes Bancaires in the ARes. message + * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low + * significant byte first and most significant bit first) that has been Base64 encoded + */ + public Builder setCbExemption(EmptyParam cbExemption) { + this.cbExemption = cbExemption; + return this; + } - private Object affirm; + /** + * The risk score returned from Cartes Bancaires in the ARes. message extension: + * CB-SCORE; numeric value 0-99 + */ + public Builder setCbScore(Long cbScore) { + this.cbScore = cbScore; + return this; + } - private Object afterpayClearpay; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Object alipay; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - private Object alma; + public enum CbAvalgo implements ApiRequestParams.EnumParam { + @SerializedName("0") + N0("0"), - private Object amazonPay; + @SerializedName("1") + N1("1"), - private Object auBecsDebit; + @SerializedName("2") + N2("2"), - private Object bacsDebit; + @SerializedName("3") + N3("3"), - private Object bancontact; + @SerializedName("4") + N4("4"), - private Object billie; + @SerializedName("A") + A("A"); - private Object blik; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object boleto; + CbAvalgo(String value) { + this.value = value; + } + } + } + } - private Object card; + public enum AresTransStatus implements ApiRequestParams.EnumParam { + @SerializedName("A") + A("A"), - private Object cardPresent; + @SerializedName("C") + C("C"), - private Object cashapp; + @SerializedName("I") + I("I"), - private Object crypto; + @SerializedName("N") + N("N"), - private Object customerBalance; + @SerializedName("R") + R("R"), - private Object eps; + @SerializedName("U") + U("U"), - private Map extraParams; + @SerializedName("Y") + Y("Y"); - private Object fpx; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object giropay; + AresTransStatus(String value) { + this.value = value; + } + } - private Object gopay; + public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { + @SerializedName("01") + N01("01"), - private Object grabpay; + @SerializedName("02") + N02("02"), - private Object idBankTransfer; + @SerializedName("05") + N05("05"), - private Object ideal; + @SerializedName("06") + N06("06"), - private Object interacPresent; + @SerializedName("07") + N07("07"); - private Object kakaoPay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object klarna; + ElectronicCommerceIndicator(String value) { + this.value = value; + } + } - private Object konbini; + public enum ExemptionIndicator implements ApiRequestParams.EnumParam { + @SerializedName("low_risk") + LOW_RISK("low_risk"), - private Object krCard; + @SerializedName("none") + NONE("none"); - private Object link; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object mbWay; + ExemptionIndicator(String value) { + this.value = value; + } + } - private Object mobilepay; + public enum Version implements ApiRequestParams.EnumParam { + @SerializedName("1.0.2") + N1__0__2("1.0.2"), - private Object multibanco; + @SerializedName("2.1.0") + N2__1__0("2.1.0"), - private Object naverPay; + @SerializedName("2.2.0") + N2__2__0("2.2.0"); - private Object nzBankAccount; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object oxxo; + Version(String value) { + this.value = value; + } + } + } - private Object p24; + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - private Object payByBank; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object payco; + CaptureMethod(String value) { + this.value = value; + } + } - private Object paynow; + public enum Network implements ApiRequestParams.EnumParam { + @SerializedName("amex") + AMEX("amex"), - private Object paypal; + @SerializedName("cartes_bancaires") + CARTES_BANCAIRES("cartes_bancaires"), - private Object paypay; + @SerializedName("diners") + DINERS("diners"), - private Object payto; + @SerializedName("discover") + DISCOVER("discover"), - private Object pix; + @SerializedName("eftpos_au") + EFTPOS_AU("eftpos_au"), - private Object promptpay; + @SerializedName("girocard") + GIROCARD("girocard"), - private Object qris; + @SerializedName("interac") + INTERAC("interac"), - private Object rechnung; + @SerializedName("jcb") + JCB("jcb"), - private Object revolutPay; + @SerializedName("link") + LINK("link"), + + @SerializedName("mastercard") + MASTERCARD("mastercard"), + + @SerializedName("unionpay") + UNIONPAY("unionpay"), + + @SerializedName("unknown") + UNKNOWN("unknown"), + + @SerializedName("visa") + VISA("visa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Network(String value) { + this.value = value; + } + } + + public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; - private Object samsungPay; + RequestDecrementalAuthorization(String value) { + this.value = value; + } + } - private Object satispay; + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object sepaDebit; + @SerializedName("never") + NEVER("never"); - private Object shopeepay; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object sofort; + RequestExtendedAuthorization(String value) { + this.value = value; + } + } - private Object stripeBalance; + public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object swish; + @SerializedName("never") + NEVER("never"); - private Object twint; + @Getter(onMethod_ = {@Override}) + private final String value; - private Object usBankAccount; + RequestIncrementalAuthorization(String value) { + this.value = value; + } + } - private Object wechatPay; + public enum RequestMulticapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - private Object zip; + @SerializedName("never") + NEVER("never"); - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions( - this.acssDebit, - this.affirm, - this.afterpayClearpay, - this.alipay, - this.alma, - this.amazonPay, - this.auBecsDebit, - this.bacsDebit, - this.bancontact, - this.billie, - this.blik, - this.boleto, - this.card, - this.cardPresent, - this.cashapp, - this.crypto, - this.customerBalance, - this.eps, - this.extraParams, - this.fpx, - this.giropay, - this.gopay, - this.grabpay, - this.idBankTransfer, - this.ideal, - this.interacPresent, - this.kakaoPay, - this.klarna, - this.konbini, - this.krCard, - this.link, - this.mbWay, - this.mobilepay, - this.multibanco, - this.naverPay, - this.nzBankAccount, - this.oxxo, - this.p24, - this.payByBank, - this.payco, - this.paynow, - this.paypal, - this.paypay, - this.payto, - this.pix, - this.promptpay, - this.qris, - this.rechnung, - this.revolutPay, - this.samsungPay, - this.satispay, - this.sepaDebit, - this.shopeepay, - this.sofort, - this.stripeBalance, - this.swish, - this.twint, - this.usBankAccount, - this.wechatPay, - this.zip); - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the - * ACSS Debit payment method options. - */ - public Builder setAcssDebit( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit acssDebit) { - this.acssDebit = acssDebit; - return this; + RequestMulticapture(String value) { + this.value = value; + } } - /** - * If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the - * ACSS Debit payment method options. - */ - public Builder setAcssDebit(EmptyParam acssDebit) { - this.acssDebit = acssDebit; - return this; - } + public enum RequestOvercapture implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. - */ - public Builder setAffirm(PaymentIntentUpdateParams.PaymentMethodOptions.Affirm affirm) { - this.affirm = affirm; - return this; - } + @SerializedName("never") + NEVER("never"); - /** - * If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm - * payment method options. - */ - public Builder setAffirm(EmptyParam affirm) { - this.affirm = affirm; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. - */ - public Builder setAfterpayClearpay( - PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; - return this; + RequestOvercapture(String value) { + this.value = value; + } } - /** - * If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about - * the Afterpay Clearpay payment method options. - */ - public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) { - this.afterpayClearpay = afterpayClearpay; - return this; - } + public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { + @SerializedName("if_available") + IF_AVAILABLE("if_available"), - /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. - */ - public Builder setAlipay(PaymentIntentUpdateParams.PaymentMethodOptions.Alipay alipay) { - this.alipay = alipay; - return this; - } + @SerializedName("never") + NEVER("never"); - /** - * If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay - * payment method options. - */ - public Builder setAlipay(EmptyParam alipay) { - this.alipay = alipay; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. - */ - public Builder setAlma(PaymentIntentUpdateParams.PaymentMethodOptions.Alma alma) { - this.alma = alma; - return this; + RequestPartialAuthorization(String value) { + this.value = value; + } } - /** - * If this is a {@code alma} PaymentMethod, this sub-hash contains details about the Alma - * payment method options. - */ - public Builder setAlma(EmptyParam alma) { - this.alma = alma; - return this; - } + public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { + @SerializedName("any") + ANY("any"), - /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. - */ - public Builder setAmazonPay( - PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay amazonPay) { - this.amazonPay = amazonPay; - return this; - } + @SerializedName("automatic") + AUTOMATIC("automatic"), - /** - * If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the - * Amazon Pay payment method options. - */ - public Builder setAmazonPay(EmptyParam amazonPay) { - this.amazonPay = amazonPay; - return this; - } + @SerializedName("challenge") + CHALLENGE("challenge"); - /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the - * AU BECS Direct Debit payment method options. - */ - public Builder setAuBecsDebit( - PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) { - this.auBecsDebit = auBecsDebit; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the - * AU BECS Direct Debit payment method options. - */ - public Builder setAuBecsDebit(EmptyParam auBecsDebit) { - this.auBecsDebit = auBecsDebit; - return this; + RequestThreeDSecure(String value) { + this.value = value; + } } - /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the - * BACS Debit payment method options. - */ - public Builder setBacsDebit( - PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit bacsDebit) { - this.bacsDebit = bacsDebit; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - /** - * If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the - * BACS Debit payment method options. - */ - public Builder setBacsDebit(EmptyParam bacsDebit) { - this.bacsDebit = bacsDebit; - return this; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. - */ - public Builder setBancontact( - PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact bancontact) { - this.bancontact = bancontact; - return this; - } + @SerializedName("on_session") + ON_SESSION("on_session"); - /** - * If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the - * Bancontact payment method options. - */ - public Builder setBancontact(EmptyParam bancontact) { - this.bancontact = bancontact; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. - */ - public Builder setBillie(PaymentIntentUpdateParams.PaymentMethodOptions.Billie billie) { - this.billie = billie; - return this; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent { /** - * If this is a {@code billie} PaymentMethod, this sub-hash contains details about the Billie - * payment method options. + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. */ - public Builder setBillie(EmptyParam billie) { - this.billie = billie; - return this; - } + @SerializedName("capture_method") + CaptureMethod captureMethod; /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setBlik(PaymentIntentUpdateParams.PaymentMethodOptions.Blik blik) { - this.blik = blik; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK - * payment method options. + * Request ability to capture this payment beyond the standard authorization + * validity window. */ - public Builder setBlik(EmptyParam blik) { - this.blik = blik; - return this; - } + @SerializedName("request_extended_authorization") + Boolean requestExtendedAuthorization; /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. + * Request ability to increment + * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported + * in the Confirm response + * to verify support. */ - public Builder setBoleto(PaymentIntentUpdateParams.PaymentMethodOptions.Boleto boleto) { - this.boleto = boleto; - return this; - } + @SerializedName("request_incremental_authorization_support") + Boolean requestIncrementalAuthorizationSupport; /** - * If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto - * payment method options. + * Network routing priority on co-branded EMV cards supporting domestic debit and + * international card schemes. */ - public Builder setBoleto(EmptyParam boleto) { - this.boleto = boleto; - return this; - } + @SerializedName("routing") + Routing routing; - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(PaymentIntentUpdateParams.PaymentMethodOptions.Card card) { - this.card = card; - return this; + private CardPresent( + CaptureMethod captureMethod, + Map extraParams, + Boolean requestExtendedAuthorization, + Boolean requestIncrementalAuthorizationSupport, + Routing routing) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.requestExtendedAuthorization = requestExtendedAuthorization; + this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; + this.routing = routing; } - /** Configuration for any card payments attempted on this PaymentIntent. */ - public Builder setCard(EmptyParam card) { - this.card = card; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. - */ - public Builder setCardPresent( - PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent cardPresent) { - this.cardPresent = cardPresent; - return this; - } + public static class Builder { + private CaptureMethod captureMethod; - /** - * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the - * Card Present payment method options. - */ - public Builder setCardPresent(EmptyParam cardPresent) { - this.cardPresent = cardPresent; - return this; - } + private Map extraParams; - /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash - * App Pay payment method options. - */ - public Builder setCashapp(PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp cashapp) { - this.cashapp = cashapp; - return this; - } + private Boolean requestExtendedAuthorization; - /** - * If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash - * App Pay payment method options. - */ - public Builder setCashapp(EmptyParam cashapp) { - this.cashapp = cashapp; - return this; - } + private Boolean requestIncrementalAuthorizationSupport; - /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. - */ - public Builder setCrypto(PaymentIntentUpdateParams.PaymentMethodOptions.Crypto crypto) { - this.crypto = crypto; - return this; - } + private Routing routing; - /** - * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto - * payment method options. - */ - public Builder setCrypto(EmptyParam crypto) { - this.crypto = crypto; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent( + this.captureMethod, + this.extraParams, + this.requestExtendedAuthorization, + this.requestIncrementalAuthorizationSupport, + this.routing); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Request ability to capture this payment beyond the standard authorization + * validity window. + */ + public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { + this.requestExtendedAuthorization = requestExtendedAuthorization; + return this; + } - /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about - * the customer balance payment method options. - */ - public Builder setCustomerBalance( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance customerBalance) { - this.customerBalance = customerBalance; - return this; - } + /** + * Request ability to increment + * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported + * in the Confirm response + * to verify support. + */ + public Builder setRequestIncrementalAuthorizationSupport( + Boolean requestIncrementalAuthorizationSupport) { + this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; + return this; + } - /** - * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about - * the customer balance payment method options. - */ - public Builder setCustomerBalance(EmptyParam customerBalance) { - this.customerBalance = customerBalance; - return this; + /** + * Network routing priority on co-branded EMV cards supporting domestic debit and + * international card schemes. + */ + public Builder setRouting( + PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing routing) { + this.routing = routing; + return this; + } } - /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS - * payment method options. - */ - public Builder setEps(PaymentIntentUpdateParams.PaymentMethodOptions.Eps eps) { - this.eps = eps; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Routing { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS - * payment method options. - */ - public Builder setEps(EmptyParam eps) { - this.eps = eps; - return this; - } + /** Routing requested priority. */ + @SerializedName("requested_priority") + RequestedPriority requestedPriority; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + private Routing(Map extraParams, RequestedPriority requestedPriority) { + this.extraParams = extraParams; + this.requestedPriority = requestedPriority; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentIntentUpdateParams.PaymentMethodOptions#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public static Builder builder() { + return new Builder(); } - this.extraParams.putAll(map); - return this; - } - /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX - * payment method options. - */ - public Builder setFpx(PaymentIntentUpdateParams.PaymentMethodOptions.Fpx fpx) { - this.fpx = fpx; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX - * payment method options. - */ - public Builder setFpx(EmptyParam fpx) { - this.fpx = fpx; - return this; - } + private RequestedPriority requestedPriority; - /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the - * Giropay payment method options. - */ - public Builder setGiropay(PaymentIntentUpdateParams.PaymentMethodOptions.Giropay giropay) { - this.giropay = giropay; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing( + this.extraParams, this.requestedPriority); + } - /** - * If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the - * Giropay payment method options. - */ - public Builder setGiropay(EmptyParam giropay) { - this.giropay = giropay; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. - */ - public Builder setGopay(PaymentIntentUpdateParams.PaymentMethodOptions.Gopay gopay) { - this.gopay = gopay; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * If this is a {@code gopay} PaymentMethod, this sub-hash contains details about the Gopay - * payment method options. - */ - public Builder setGopay(EmptyParam gopay) { - this.gopay = gopay; - return this; - } + /** Routing requested priority. */ + public Builder setRequestedPriority( + PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority + requestedPriority) { + this.requestedPriority = requestedPriority; + return this; + } + } - /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the - * Grabpay payment method options. - */ - public Builder setGrabpay(PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay grabpay) { - this.grabpay = grabpay; - return this; - } + public enum RequestedPriority implements ApiRequestParams.EnumParam { + @SerializedName("domestic") + DOMESTIC("domestic"), - /** - * If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the - * Grabpay payment method options. - */ - public Builder setGrabpay(EmptyParam grabpay) { - this.grabpay = grabpay; - return this; - } + @SerializedName("international") + INTERNATIONAL("international"); - /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about - * the Indonesia Bank Transfer payment method options. - */ - public Builder setIdBankTransfer( - PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { - this.idBankTransfer = idBankTransfer; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about - * the Indonesia Bank Transfer payment method options. - */ - public Builder setIdBankTransfer(EmptyParam idBankTransfer) { - this.idBankTransfer = idBankTransfer; - return this; + RequestedPriority(String value) { + this.value = value; + } + } } - /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. - */ - public Builder setIdeal(PaymentIntentUpdateParams.PaymentMethodOptions.Ideal ideal) { - this.ideal = ideal; - return this; + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp { /** - * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal - * payment method options. + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. */ - public Builder setIdeal(EmptyParam ideal) { - this.ideal = ideal; - return this; - } + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about - * the Card Present payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setInteracPresent( - PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent interacPresent) { - this.interacPresent = interacPresent; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about - * the Card Present payment method options. + * 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 setInteracPresent(EmptyParam interacPresent) { - this.interacPresent = interacPresent; - return this; - } + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; - /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the - * Kakao Pay payment method options. - */ - public Builder setKakaoPay(PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay kakaoPay) { - this.kakaoPay = kakaoPay; - return this; + private Cashapp( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * If this is a {@code kakao_pay} PaymentMethod, this sub-hash contains details about the - * Kakao Pay payment method options. - */ - public Builder setKakaoPay(EmptyParam kakaoPay) { - this.kakaoPay = kakaoPay; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. - */ - public Builder setKlarna(PaymentIntentUpdateParams.PaymentMethodOptions.Klarna klarna) { - this.klarna = klarna; - return this; - } + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; - /** - * If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna - * payment method options. - */ - public Builder setKlarna(EmptyParam klarna) { - this.klarna = klarna; - return this; - } + private Map extraParams; - /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the - * Konbini payment method options. - */ - public Builder setKonbini(PaymentIntentUpdateParams.PaymentMethodOptions.Konbini konbini) { - this.konbini = konbini; - return this; - } + private ApiRequestParams.EnumParam setupFutureUsage; - /** - * If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the - * Konbini payment method options. - */ - public Builder setKonbini(EmptyParam konbini) { - this.konbini = konbini; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } - /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR - * Card payment method options. - */ - public Builder setKrCard(PaymentIntentUpdateParams.PaymentMethodOptions.KrCard krCard) { - this.krCard = krCard; - return this; - } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } - /** - * If this is a {@code kr_card} PaymentMethod, this sub-hash contains details about the KR - * Card payment method options. - */ - public Builder setKrCard(EmptyParam krCard) { - this.krCard = krCard; - return this; + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.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 PaymentIntentUpdateParams.PaymentMethodOptions.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; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp.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; + } } - /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - public Builder setLink(PaymentIntentUpdateParams.PaymentMethodOptions.Link link) { - this.link = link; - return this; - } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); - /** - * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link - * payment method options. - */ - public Builder setLink(EmptyParam link) { - this.link = link; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. - */ - public Builder setMbWay(PaymentIntentUpdateParams.PaymentMethodOptions.MbWay mbWay) { - this.mbWay = mbWay; - return this; + CaptureMethod(String value) { + this.value = value; + } } - /** - * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY - * payment method options. - */ - public Builder setMbWay(EmptyParam mbWay) { - this.mbWay = mbWay; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - public Builder setMobilepay( - PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay mobilepay) { - this.mobilepay = mobilepay; - return this; - } + @SerializedName("off_session") + OFF_SESSION("off_session"), - /** - * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the - * MobilePay payment method options. - */ - public Builder setMobilepay(EmptyParam mobilepay) { - this.mobilepay = mobilepay; - return this; - } + @SerializedName("on_session") + ON_SESSION("on_session"); - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - public Builder setMultibanco( - PaymentIntentUpdateParams.PaymentMethodOptions.Multibanco multibanco) { - this.multibanco = multibanco; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the - * Multibanco payment method options. - */ - public Builder setMultibanco(EmptyParam multibanco) { - this.multibanco = multibanco; - return this; + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the - * Naver Pay payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setNaverPay(PaymentIntentUpdateParams.PaymentMethodOptions.NaverPay naverPay) { - this.naverPay = naverPay; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code naver_pay} PaymentMethod, this sub-hash contains details about the - * Naver Pay payment method options. + * 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 setNaverPay(EmptyParam naverPay) { - this.naverPay = naverPay; - return this; - } + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about - * the NZ BECS Direct Debit payment method options. - */ - public Builder setNzBankAccount( - PaymentIntentUpdateParams.PaymentMethodOptions.NzBankAccount nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; + private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } - /** - * If this is a {@code nz_bank_account} PaymentMethod, this sub-hash contains details about - * the NZ BECS Direct Debit payment method options. - */ - public Builder setNzBankAccount(EmptyParam nzBankAccount) { - this.nzBankAccount = nzBankAccount; - return this; + public static Builder builder() { + return new Builder(); } - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - public Builder setOxxo(PaymentIntentUpdateParams.PaymentMethodOptions.Oxxo oxxo) { - this.oxxo = oxxo; - return this; - } + public static class Builder { + private Map extraParams; - /** - * If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO - * payment method options. - */ - public Builder setOxxo(EmptyParam oxxo) { - this.oxxo = oxxo; - return this; - } + private SetupFutureUsage setupFutureUsage; - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - public Builder setP24(PaymentIntentUpdateParams.PaymentMethodOptions.P24 p24) { - this.p24 = p24; - return this; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Crypto build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Crypto( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Crypto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Crypto#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Crypto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } - /** - * If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24 - * payment method options. - */ - public Builder setP24(EmptyParam p24) { - this.p24 = p24; - return this; + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerBalance { /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. */ - public Builder setPayByBank( - PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank payByBank) { - this.payByBank = payByBank; - return this; - } + @SerializedName("bank_transfer") + BankTransfer bankTransfer; /** - * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the - * PayByBank payment method options. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setPayByBank(EmptyParam payByBank) { - this.payByBank = payByBank; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. + * The funding method type to be used when there are not enough funds in the customer balance. + * Permitted values include: {@code bank_transfer}. */ - public Builder setPayco(PaymentIntentUpdateParams.PaymentMethodOptions.Payco payco) { - this.payco = payco; - return this; - } + @SerializedName("funding_type") + FundingType fundingType; /** - * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO - * payment method options. + * 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 setPayco(EmptyParam payco) { - this.payco = payco; - return this; + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private CustomerBalance( + BankTransfer bankTransfer, + Map extraParams, + FundingType fundingType, + SetupFutureUsage setupFutureUsage) { + this.bankTransfer = bankTransfer; + this.extraParams = extraParams; + this.fundingType = fundingType; + this.setupFutureUsage = setupFutureUsage; } - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - public Builder setPaynow(PaymentIntentUpdateParams.PaymentMethodOptions.Paynow paynow) { - this.paynow = paynow; - return this; + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankTransfer bankTransfer; + + private Map extraParams; + + private FundingType fundingType; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance( + this.bankTransfer, this.extraParams, this.fundingType, this.setupFutureUsage); + } + + /** + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. + */ + public Builder setBankTransfer( + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + bankTransfer) { + this.bankTransfer = bankTransfer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.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 + * PaymentIntentUpdateParams.PaymentMethodOptions.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; + } + + /** + * The funding method type to be used when there are not enough funds in the customer + * balance. Permitted values include: {@code bank_transfer}. + */ + public Builder setFundingType( + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.FundingType + fundingType) { + this.fundingType = fundingType; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } - /** - * If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow - * payment method options. - */ - public Builder setPaynow(EmptyParam paynow) { - this.paynow = paynow; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankTransfer { + /** Configuration for the eu_bank_transfer funding type. */ + @SerializedName("eu_bank_transfer") + EuBankTransfer euBankTransfer; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * List of address types that should be returned in the financial_addresses response. If not + * specified, all valid types will be returned. + * + *

Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code + * spei}. + */ + @SerializedName("requested_address_types") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes; + + /** + * Required. The list of bank transfer types that this PaymentIntent is + * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code + * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code + * us_bank_transfer}. + */ + @SerializedName("type") + Type type; + + private BankTransfer( + EuBankTransfer euBankTransfer, + Map extraParams, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes, + Type type) { + this.euBankTransfer = euBankTransfer; + this.extraParams = extraParams; + this.requestedAddressTypes = requestedAddressTypes; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private EuBankTransfer euBankTransfer; + + private Map extraParams; + + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + requestedAddressTypes; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer( + this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); + } + + /** Configuration for the eu_bank_transfer funding type. */ + public Builder setEuBankTransfer( + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer + euBankTransfer) { + this.euBankTransfer = euBankTransfer; + return this; + } - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - public Builder setPaypal(PaymentIntentUpdateParams.PaymentMethodOptions.Paypal paypal) { - this.paypal = paypal; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal - * payment method options. - */ - public Builder setPaypal(EmptyParam paypal) { - this.paypal = paypal; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - public Builder setPaypay(PaymentIntentUpdateParams.PaymentMethodOptions.Paypay paypay) { - this.paypay = paypay; - return this; - } + /** + * Add an element to `requestedAddressTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} + * for the field documentation. + */ + public Builder addRequestedAddressType( + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType + element) { + if (this.requestedAddressTypes == null) { + this.requestedAddressTypes = new ArrayList<>(); + } + this.requestedAddressTypes.add(element); + return this; + } - /** - * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay - * payment method options. - */ - public Builder setPaypay(EmptyParam paypay) { - this.paypay = paypay; - return this; - } + /** + * Add all elements to `requestedAddressTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} + * for the field documentation. + */ + public Builder addAllRequestedAddressType( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .RequestedAddressType> + elements) { + if (this.requestedAddressTypes == null) { + this.requestedAddressTypes = new ArrayList<>(); + } + this.requestedAddressTypes.addAll(elements); + return this; + } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - public Builder setPayto(PaymentIntentUpdateParams.PaymentMethodOptions.Payto payto) { - this.payto = payto; - return this; - } + /** + * Required. The list of bank transfer types that this PaymentIntent is + * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code + * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code + * us_bank_transfer}. + */ + public Builder setType( + PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.Type + type) { + this.type = type; + return this; + } + } - /** - * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo - * payment method options. - */ - public Builder setPayto(EmptyParam payto) { - this.payto = payto; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EuBankTransfer { + /** + * Required. The desired country code of the bank account information. + * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, + * or {@code NL}. + */ + @SerializedName("country") + Object country; - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix - * payment method options. - */ - public Builder setPix(PaymentIntentUpdateParams.PaymentMethodOptions.Pix pix) { - this.pix = pix; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix - * payment method options. - */ - public Builder setPix(EmptyParam pix) { - this.pix = pix; - return this; - } + private EuBankTransfer(Object country, Map extraParams) { + this.country = country; + this.extraParams = extraParams; + } - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - public Builder setPromptpay( - PaymentIntentUpdateParams.PaymentMethodOptions.Promptpay promptpay) { - this.promptpay = promptpay; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the - * PromptPay payment method options. - */ - public Builder setPromptpay(EmptyParam promptpay) { - this.promptpay = promptpay; - return this; - } + public static class Builder { + private Object country; - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - public Builder setQris(PaymentIntentUpdateParams.PaymentMethodOptions.Qris qris) { - this.qris = qris; - return this; - } + private Map extraParams; - /** - * If this is a {@code qris} PaymentMethod, this sub-hash contains details about the QRIS - * payment method options. - */ - public Builder setQris(EmptyParam qris) { - this.qris = qris; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer + .EuBankTransfer(this.country, this.extraParams); + } - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - public Builder setRechnung(PaymentIntentUpdateParams.PaymentMethodOptions.Rechnung rechnung) { - this.rechnung = rechnung; - return this; - } + /** + * Required. The desired country code of the bank account information. + * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, + * or {@code NL}. + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** - * If this is a {@code rechnung} PaymentMethod, this sub-hash contains details about the - * Rechnung payment method options. - */ - public Builder setRechnung(EmptyParam rechnung) { - this.rechnung = rechnung; - return this; - } + /** + * Required. The desired country code of the bank account information. + * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, + * or {@code NL}. + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - public Builder setRevolutPay( - PaymentIntentUpdateParams.PaymentMethodOptions.RevolutPay revolutPay) { - this.revolutPay = revolutPay; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the - * Revolut Pay payment method options. - */ - public Builder setRevolutPay(EmptyParam revolutPay) { - this.revolutPay = revolutPay; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } - /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. - */ - public Builder setSamsungPay( - PaymentIntentUpdateParams.PaymentMethodOptions.SamsungPay samsungPay) { - this.samsungPay = samsungPay; - return this; - } + public enum RequestedAddressType implements ApiRequestParams.EnumParam { + @SerializedName("aba") + ABA("aba"), - /** - * If this is a {@code samsung_pay} PaymentMethod, this sub-hash contains details about the - * Samsung Pay payment method options. - */ - public Builder setSamsungPay(EmptyParam samsungPay) { - this.samsungPay = samsungPay; - return this; - } + @SerializedName("iban") + IBAN("iban"), - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - public Builder setSatispay(PaymentIntentUpdateParams.PaymentMethodOptions.Satispay satispay) { - this.satispay = satispay; - return this; - } + @SerializedName("sepa") + SEPA("sepa"), - /** - * If this is a {@code satispay} PaymentMethod, this sub-hash contains details about the - * Satispay payment method options. - */ - public Builder setSatispay(EmptyParam satispay) { - this.satispay = satispay; - return this; - } + @SerializedName("sort_code") + SORT_CODE("sort_code"), - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the - * SEPA Debit payment method options. - */ - public Builder setSepaDebit( - PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit sepaDebit) { - this.sepaDebit = sepaDebit; - return this; - } + @SerializedName("spei") + SPEI("spei"), - /** - * If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the - * SEPA Debit payment method options. - */ - public Builder setSepaDebit(EmptyParam sepaDebit) { - this.sepaDebit = sepaDebit; - return this; - } + @SerializedName("swift") + SWIFT("swift"), - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - public Builder setShopeepay( - PaymentIntentUpdateParams.PaymentMethodOptions.Shopeepay shopeepay) { - this.shopeepay = shopeepay; - return this; - } + @SerializedName("zengin") + ZENGIN("zengin"); - /** - * If this is a {@code shopeepay} PaymentMethod, this sub-hash contains details about the - * ShopeePay payment method options. - */ - public Builder setShopeepay(EmptyParam shopeepay) { - this.shopeepay = shopeepay; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - public Builder setSofort(PaymentIntentUpdateParams.PaymentMethodOptions.Sofort sofort) { - this.sofort = sofort; - return this; - } + RequestedAddressType(String value) { + this.value = value; + } + } - /** - * If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT - * payment method options. - */ - public Builder setSofort(EmptyParam sofort) { - this.sofort = sofort; - return this; - } + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("eu_bank_transfer") + EU_BANK_TRANSFER("eu_bank_transfer"), - /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. - */ - public Builder setStripeBalance( - PaymentIntentUpdateParams.PaymentMethodOptions.StripeBalance stripeBalance) { - this.stripeBalance = stripeBalance; - return this; - } + @SerializedName("gb_bank_transfer") + GB_BANK_TRANSFER("gb_bank_transfer"), - /** - * If this is a {@code stripe_balance} PaymentMethod, this sub-hash contains details about the - * Stripe Balance payment method options. - */ - public Builder setStripeBalance(EmptyParam stripeBalance) { - this.stripeBalance = stripeBalance; - return this; - } + @SerializedName("jp_bank_transfer") + JP_BANK_TRANSFER("jp_bank_transfer"), - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - public Builder setSwish(PaymentIntentUpdateParams.PaymentMethodOptions.Swish swish) { - this.swish = swish; - return this; - } + @SerializedName("mx_bank_transfer") + MX_BANK_TRANSFER("mx_bank_transfer"), - /** - * If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish - * payment method options. - */ - public Builder setSwish(EmptyParam swish) { - this.swish = swish; - return this; - } + @SerializedName("us_bank_transfer") + US_BANK_TRANSFER("us_bank_transfer"); - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - public Builder setTwint(PaymentIntentUpdateParams.PaymentMethodOptions.Twint twint) { - this.twint = twint; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT - * payment method options. - */ - public Builder setTwint(EmptyParam twint) { - this.twint = twint; - return this; + Type(String value) { + this.value = value; + } + } } - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about - * the US bank account payment method options. - */ - public Builder setUsBankAccount( - PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { - this.usBankAccount = usBankAccount; - return this; - } + public enum FundingType implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); - /** - * If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about - * the US bank account payment method options. - */ - public Builder setUsBankAccount(EmptyParam usBankAccount) { - this.usBankAccount = usBankAccount; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - public Builder setWechatPay( - PaymentIntentUpdateParams.PaymentMethodOptions.WechatPay wechatPay) { - this.wechatPay = wechatPay; - return this; + FundingType(String value) { + this.value = value; + } } - /** - * If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the - * WeChat Pay payment method options. - */ - public Builder setWechatPay(EmptyParam wechatPay) { - this.wechatPay = wechatPay; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip - * payment method options. - */ - public Builder setZip(PaymentIntentUpdateParams.PaymentMethodOptions.Zip zip) { - this.zip = zip; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip - * payment method options. - */ - public Builder setZip(EmptyParam zip) { - this.zip = zip; - return this; + SetupFutureUsage(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class AcssDebit { + public static class 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. @@ -16318,10 +29058,6 @@ public static class AcssDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -16346,31 +29082,11 @@ public static class AcssDebit { * off_session}. */ @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; - - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - Object targetDate; - - /** Bank account verification method. */ - @SerializedName("verification_method") - VerificationMethod verificationMethod; + SetupFutureUsage setupFutureUsage; - private AcssDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - Object targetDate, - VerificationMethod verificationMethod) { + private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - this.verificationMethod = verificationMethod; } public static Builder builder() { @@ -16380,29 +29096,19 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private MandateOptions mandateOptions; - - private ApiRequestParams.EnumParam setupFutureUsage; - - private Object targetDate; - - private VerificationMethod verificationMethod; + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit( - this.extraParams, - this.mandateOptions, - this.setupFutureUsage, - this.targetDate, - this.verificationMethod); + public PaymentIntentUpdateParams.PaymentMethodOptions.Eps build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Eps( + this.extraParams, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Eps#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16415,8 +29121,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Eps#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16426,14 +29132,6 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Additional fields for Mandate creation. */ - public Builder setMandateOptions( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions - mandateOptions) { - this.mandateOptions = mandateOptions; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -16459,277 +29157,276 @@ public Builder setMandateOptions( * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + PaymentIntentUpdateParams.PaymentMethodOptions.Eps.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + } - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(String targetDate) { - this.targetDate = targetDate; - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(EmptyParam targetDate) { - this.targetDate = targetDate; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Bank account verification method. */ - public Builder setVerificationMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.VerificationMethod - verificationMethod) { - this.verificationMethod = verificationMethod; - return this; + SetupFutureUsage(String value) { + this.value = value; } } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - @SerializedName("custom_mandate_url") - Object customMandateUrl; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. - */ - @SerializedName("interval_description") - Object intervalDescription; - - /** Payment schedule for the mandate. */ - @SerializedName("payment_schedule") - PaymentSchedule paymentSchedule; - - /** Transaction type of the mandate. */ - @SerializedName("transaction_type") - TransactionType transactionType; - - private MandateOptions( - Object customMandateUrl, - Map extraParams, - Object intervalDescription, - PaymentSchedule paymentSchedule, - TransactionType transactionType) { - this.customMandateUrl = customMandateUrl; - this.extraParams = extraParams; - this.intervalDescription = intervalDescription; - this.paymentSchedule = paymentSchedule; - this.transactionType = transactionType; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Fpx { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static Builder builder() { - return new Builder(); - } + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - public static class Builder { - private Object customMandateUrl; + private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } - private Map extraParams; + public static Builder builder() { + return new Builder(); + } - private Object intervalDescription; + public static class Builder { + private Map extraParams; - private PaymentSchedule paymentSchedule; + private SetupFutureUsage setupFutureUsage; - private TransactionType transactionType; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Fpx build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Fpx( + this.extraParams, this.setupFutureUsage); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions( - this.customMandateUrl, - this.extraParams, - this.intervalDescription, - this.paymentSchedule, - this.transactionType); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Fpx#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); } + this.extraParams.put(key, value); + return this; + } - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - public Builder setCustomMandateUrl(String customMandateUrl) { - this.customMandateUrl = customMandateUrl; - return this; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Fpx#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); } + this.extraParams.putAll(map); + return this; + } - /** - * A URL for custom mandate text to render during confirmation step. The URL will be - * rendered with additional GET parameters {@code payment_intent} and {@code - * payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent} - * and {@code setup_intent_client_secret} when confirming a Setup Intent. - */ - public Builder setCustomMandateUrl(EmptyParam customMandateUrl) { - this.customMandateUrl = customMandateUrl; - return this; - } + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Fpx.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. - */ - public Builder setIntervalDescription(String intervalDescription) { - this.intervalDescription = intervalDescription; - return this; - } + SetupFutureUsage(String value) { + this.value = value; + } + } + } - /** - * Description of the mandate interval. Only required if 'payment_schedule' parameter is - * 'interval' or 'combined'. - */ - public Builder setIntervalDescription(EmptyParam intervalDescription) { - this.intervalDescription = intervalDescription; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Giropay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Payment schedule for the mandate. */ - public Builder setPaymentSchedule( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions - .PaymentSchedule - paymentSchedule) { - this.paymentSchedule = paymentSchedule; - 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}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; - /** Transaction type of the mandate. */ - public Builder setTransactionType( - PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.MandateOptions - .TransactionType - transactionType) { - this.transactionType = transactionType; - return this; - } - } + private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } - public enum PaymentSchedule implements ApiRequestParams.EnumParam { - @SerializedName("combined") - COMBINED("combined"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("interval") - INTERVAL("interval"), + public static class Builder { + private Map extraParams; - @SerializedName("sporadic") - SPORADIC("sporadic"); + private SetupFutureUsage setupFutureUsage; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Giropay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Giropay( + this.extraParams, this.setupFutureUsage); + } - PaymentSchedule(String value) { - this.value = value; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Giropay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); } + this.extraParams.put(key, value); + return this; } - public enum TransactionType implements ApiRequestParams.EnumParam { - @SerializedName("business") - BUSINESS("business"), - - @SerializedName("personal") - PERSONAL("personal"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - TransactionType(String value) { - this.value = value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Giropay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Giropay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"), - - @SerializedName("on_session") - ON_SESSION("on_session"); + NONE("none"); @Getter(onMethod_ = {@Override}) private final String value; @@ -16738,42 +29435,11 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { this.value = value; } } - - public enum VerificationMethod implements ApiRequestParams.EnumParam { - @SerializedName("automatic") - AUTOMATIC("automatic"), - - @SerializedName("instant") - INSTANT("instant"), - - @SerializedName("microdeposits") - MICRODEPOSITS("microdeposits"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - VerificationMethod(String value) { - this.value = value; - } - } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Affirm { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + public static class Gopay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -16783,10 +29449,6 @@ public static class Affirm { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Preferred language of the Affirm authorization page that the customer is redirected to. */ - @SerializedName("preferred_locale") - Object preferredLocale; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -16813,14 +29475,8 @@ public static class Affirm { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Affirm( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - Object preferredLocale, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; } @@ -16829,56 +29485,21 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private Object preferredLocale; - private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Affirm build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Affirm( - this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentUpdateParams.PaymentMethodOptions.Gopay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Gopay( + this.extraParams, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Affirm#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Gopay#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16891,8 +29512,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Affirm#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Gopay#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16903,18 +29524,136 @@ public Builder putAllExtraParam(Map map) { } /** - * Preferred language of the Affirm authorization page that the customer is redirected to. + * 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 setPreferredLocale(String preferredLocale) { - this.preferredLocale = preferredLocale; + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Gopay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Preferred language of the Affirm authorization page that the customer is redirected to. + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay#extraParams} for + * the field documentation. */ - public Builder setPreferredLocale(EmptyParam preferredLocale) { - this.preferredLocale = preferredLocale; + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } @@ -16943,25 +29682,13 @@ public Builder setPreferredLocale(EmptyParam preferredLocale) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Affirm.SetupFutureUsage + PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -16977,19 +29704,20 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class AfterpayClearpay { + public static class IdBankTransfer { /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 + * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + @SerializedName("expires_after") + Long expiresAfter; + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + @SerializedName("expires_at") + Long expiresAt; /** * Map of extra parameters for custom features not available in this client library. The @@ -17000,14 +29728,6 @@ public static class AfterpayClearpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * An internal identifier or reference that this payment corresponds to. You must limit the - * identifier to 128 characters, and it can only contain letters, numbers, underscores, - * backslashes, and dashes. This field differs from the statement descriptor and item name. - */ - @SerializedName("reference") - Object reference; - /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -17034,14 +29754,14 @@ public static class AfterpayClearpay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AfterpayClearpay( - ApiRequestParams.EnumParam captureMethod, + private IdBankTransfer( + Long expiresAfter, + Long expiresAt, Map extraParams, - Object reference, SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + this.expiresAfter = expiresAfter; + this.expiresAt = expiresAt; this.extraParams = extraParams; - this.reference = reference; this.setupFutureUsage = setupFutureUsage; } @@ -17050,49 +29770,35 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Long expiresAfter; - private Map extraParams; + private Long expiresAt; - private Object reference; + private Map extraParams; private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay( - this.captureMethod, this.extraParams, this.reference, this.setupFutureUsage); + public PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer( + this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod - captureMethod) { - this.captureMethod = captureMethod; + public Builder setExpiresAfter(Long expiresAfter) { + this.expiresAfter = expiresAfter; return this; } /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; return this; } @@ -17100,8 +29806,8 @@ public Builder setCaptureMethod(EmptyParam captureMethod) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the - * field documentation. + * PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17115,8 +29821,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay#extraParams} for the - * field documentation. + * PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17126,26 +29832,6 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * An internal identifier or reference that this payment corresponds to. You must limit the - * identifier to 128 characters, and it can only contain letters, numbers, underscores, - * backslashes, and dashes. This field differs from the statement descriptor and item name. - */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } - - /** - * An internal identifier or reference that this payment corresponds to. You must limit the - * identifier to 128 characters, and it can only contain letters, numbers, underscores, - * backslashes, and dashes. This field differs from the statement descriptor and item name. - */ - public Builder setReference(EmptyParam reference) { - this.reference = reference; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -17171,25 +29857,13 @@ public Builder setReference(EmptyParam reference) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage + PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -17205,7 +29879,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Alipay { + public static class Ideal { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -17241,7 +29915,7 @@ public static class Alipay { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; - private Alipay(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + private Ideal(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -17256,16 +29930,16 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Alipay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Alipay( + public PaymentIntentUpdateParams.PaymentMethodOptions.Ideal build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Ideal( this.extraParams, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alipay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Ideal#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17278,8 +29952,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alipay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Ideal#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17314,7 +29988,7 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Alipay.SetupFutureUsage + PaymentIntentUpdateParams.PaymentMethodOptions.Ideal.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; @@ -17368,7 +30042,68 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Alma { + public static class InteracPresent { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private InteracPresent(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay { /** * Controls when the funds are captured from the customer's account. * @@ -17388,12 +30123,38 @@ public static class Alma { * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) * name in this param object. Effectively, this map is flattened to its parent instance. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; - private Alma(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + private KakaoPay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -17405,10 +30166,12 @@ public static class Builder { private Map extraParams; + private ApiRequestParams.EnumParam setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Alma build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Alma( - this.captureMethod, this.extraParams); + public PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay( + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -17422,7 +30185,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.Alma build() { * value for this parameter unsets the stored value for this payment method type. */ public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { + PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { this.captureMethod = captureMethod; return this; } @@ -17445,8 +30208,8 @@ public Builder setCaptureMethod(EmptyParam captureMethod) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alma#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17459,8 +30222,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alma#extraParams} for the - * field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17469,6 +30232,58 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -17482,11 +30297,26 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class AmazonPay { + public static class Klarna { /** * Controls when the funds are captured from the customer's account. * @@ -17509,6 +30339,14 @@ public static class AmazonPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** On-demand details if setting up or charging an on-demand payment. */ + @SerializedName("on_demand") + OnDemand onDemand; + + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -17527,17 +30365,37 @@ public static class AmazonPay { *

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; + SetupFutureUsage setupFutureUsage; - private AmazonPay( + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + @SerializedName("supplementary_purchase_data") + Object supplementaryPurchaseData; + + private Klarna( ApiRequestParams.EnumParam captureMethod, Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { + OnDemand onDemand, + PreferredLocale preferredLocale, + SetupFutureUsage setupFutureUsage, + Object subscriptions, + Object supplementaryPurchaseData) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.onDemand = onDemand; + this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; + this.supplementaryPurchaseData = supplementaryPurchaseData; } public static Builder builder() { @@ -17549,12 +30407,26 @@ public static class Builder { private Map extraParams; - private ApiRequestParams.EnumParam setupFutureUsage; + private OnDemand onDemand; + + private PreferredLocale preferredLocale; + + private SetupFutureUsage setupFutureUsage; + + private Object subscriptions; + + private Object supplementaryPurchaseData; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay( - this.captureMethod, this.extraParams, this.setupFutureUsage); + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna( + this.captureMethod, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.setupFutureUsage, + this.subscriptions, + this.supplementaryPurchaseData); } /** @@ -17568,7 +30440,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay build() { * value for this parameter unsets the stored value for this payment method type. */ public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { this.captureMethod = captureMethod; return this; } @@ -17591,7 +30463,7 @@ public Builder setCaptureMethod(EmptyParam captureMethod) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -17605,7 +30477,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -17616,6 +30488,22 @@ public Builder putAllExtraParam(Map map) { return this; } + /** On-demand details if setting up or charging an on-demand payment. */ + public Builder setOnDemand( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.PreferredLocale preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -17635,468 +30523,571 @@ public Builder putAllExtraParam(Map map) { *

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List + subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } + + /** Supplementary Purchase Data for the corresponding Klarna payment. */ + public Builder setSupplementaryPurchaseData(EmptyParam supplementaryPurchaseData) { + this.supplementaryPurchaseData = supplementaryPurchaseData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName("maximum_amount") + Long maximumAmount; /** - * 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. + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @SerializedName("minimum_amount") + Long minimumAmount; - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; - CaptureMethod(String value) { - this.value = value; + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + public static class Builder { + private Long averageAmount; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Long maximumAmount; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class AuBecsDebit { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Long minimumAmount; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + private PurchaseInterval purchaseInterval; - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - Object targetDate; + private Long purchaseIntervalCount; - private AuBecsDebit( - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage, - Object targetDate) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } - public static Builder builder() { - return new Builder(); - } + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + return this; + } - public static class Builder { - private Map extraParams; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private Object targetDate; + /** + * The maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage, this.targetDate); - } + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum PurchaseInterval 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; + + PurchaseInterval(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { /** - * 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}. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; /** - * 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}. + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + Object name; + + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. */ - public Builder setTargetDate(String targetDate) { - this.targetDate = targetDate; - return this; + @SerializedName("reference") + Object reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + Object name, + NextBilling nextBilling, + Object reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; } - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(EmptyParam targetDate) { - this.targetDate = targetDate; - return this; + public static Builder builder() { + return new Builder(); } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + public static class Builder { + private Map extraParams; - @SerializedName("off_session") - OFF_SESSION("off_session"), + private Interval interval; - @SerializedName("on_session") - ON_SESSION("on_session"); + private Long intervalCount; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object name; - SetupFutureUsage(String value) { - this.value = value; + private NextBilling nextBilling; + + private Object reference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.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. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Name for subscription. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BacsDebit { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + Object date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** Additional fields for Mandate creation. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + private NextBilling(Long amount, Object date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + public static Builder builder() { + return new Builder(); + } - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The date - * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 - * calendar days from now. - */ - @SerializedName("target_date") - Object targetDate; + public static class Builder { + private Long amount; - private BacsDebit( - Map extraParams, - MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage, - Object targetDate) { - this.extraParams = extraParams; - this.mandateOptions = mandateOptions; - this.setupFutureUsage = setupFutureUsage; - this.targetDate = targetDate; - } + private Object date; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private Map extraParams; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } - private MandateOptions mandateOptions; + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } - private Object targetDate; + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(EmptyParam date) { + this.date = date; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.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; - } + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), - /** Additional fields for Mandate creation. */ - public Builder setMandateOptions( - PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions - mandateOptions) { - this.mandateOptions = mandateOptions; - return this; - } + @SerializedName("month") + MONTH("month"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName("week") + WEEK("week"), - /** - * 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; - } + @SerializedName("year") + YEAR("year"); - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(String targetDate) { - this.targetDate = targetDate; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Controls when Stripe will attempt to debit the funds from the customer's account. The - * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 - * and 15 calendar days from now. - */ - public Builder setTargetDate(EmptyParam targetDate) { - this.targetDate = targetDate; - return this; + Interval(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { + public static class SupplementaryPurchaseData { + /** Supplementary bus reservation details. */ + @SerializedName("bus_reservation_details") + Object busReservationDetails; + + /** Supplementary event reservation details. */ + @SerializedName("event_reservation_details") + Object eventReservationDetails; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -18107,17 +31098,49 @@ public static class MandateOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special characters: - * '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - */ - @SerializedName("reference_prefix") - Object referencePrefix; + /** Supplementary ferry reservation details. */ + @SerializedName("ferry_reservation_details") + Object ferryReservationDetails; - private MandateOptions(Map extraParams, Object referencePrefix) { + /** Supplementary insurance details. */ + @SerializedName("insurances") + Object insurances; + + /** Supplementary marketplace seller details. */ + @SerializedName("marketplace_sellers") + Object marketplaceSellers; + + /** Supplementary round trip reservation details. */ + @SerializedName("round_trip_reservation_details") + Object roundTripReservationDetails; + + /** Supplementary train reservation details. */ + @SerializedName("train_reservation_details") + Object trainReservationDetails; + + /** Voucher details, such as a gift card or discount code. */ + @SerializedName("vouchers") + Object vouchers; + + private SupplementaryPurchaseData( + Object busReservationDetails, + Object eventReservationDetails, + Map extraParams, + Object ferryReservationDetails, + Object insurances, + Object marketplaceSellers, + Object roundTripReservationDetails, + Object trainReservationDetails, + Object vouchers) { + this.busReservationDetails = busReservationDetails; + this.eventReservationDetails = eventReservationDetails; this.extraParams = extraParams; - this.referencePrefix = referencePrefix; + this.ferryReservationDetails = ferryReservationDetails; + this.insurances = insurances; + this.marketplaceSellers = marketplaceSellers; + this.roundTripReservationDetails = roundTripReservationDetails; + this.trainReservationDetails = trainReservationDetails; + this.vouchers = vouchers; } public static Builder builder() { @@ -18125,21 +31148,187 @@ public static Builder builder() { } public static class Builder { + private Object busReservationDetails; + + private Object eventReservationDetails; + private Map extraParams; - private Object referencePrefix; + private Object ferryReservationDetails; + + private Object insurances; + + private Object marketplaceSellers; + + private Object roundTripReservationDetails; + + private Object trainReservationDetails; + + private Object vouchers; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions( - this.extraParams, this.referencePrefix); + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData( + this.busReservationDetails, + this.eventReservationDetails, + this.extraParams, + this.ferryReservationDetails, + this.insurances, + this.marketplaceSellers, + this.roundTripReservationDetails, + this.trainReservationDetails, + this.vouchers); + } + + /** + * Add an element to `busReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addBusReservationDetail( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail + element) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `busReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#busReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllBusReservationDetail( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + elements) { + if (this.busReservationDetails == null + || this.busReservationDetails instanceof EmptyParam) { + this.busReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail>) + this.busReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails(EmptyParam busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** Supplementary bus reservation details. */ + public Builder setBusReservationDetails( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail> + busReservationDetails) { + this.busReservationDetails = busReservationDetails; + return this; + } + + /** + * Add an element to `eventReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addEventReservationDetail( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail + element) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `eventReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#eventReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllEventReservationDetail( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + elements) { + if (this.eventReservationDetails == null + || this.eventReservationDetails instanceof EmptyParam) { + this.eventReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail>) + this.eventReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails(EmptyParam eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; + } + + /** Supplementary event reservation details. */ + public Builder setEventReservationDetails( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail> + eventReservationDetails) { + this.eventReservationDetails = eventReservationDetails; + return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -18154,7 +31343,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit.MandateOptions#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -18166,1517 +31355,1650 @@ public Builder putAllExtraParam(Map map) { } /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special - * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + * Add an element to `ferryReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. */ - public Builder setReferencePrefix(String referencePrefix) { - this.referencePrefix = referencePrefix; + @SuppressWarnings("unchecked") + public Builder addFerryReservationDetail( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail + element) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .add(element); return this; } /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special - * characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + * Add all elements to `ferryReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#ferryReservationDetails} + * for the field documentation. */ - public Builder setReferencePrefix(EmptyParam referencePrefix) { - this.referencePrefix = referencePrefix; + @SuppressWarnings("unchecked") + public Builder addAllFerryReservationDetail( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + elements) { + if (this.ferryReservationDetails == null + || this.ferryReservationDetails instanceof EmptyParam) { + this.ferryReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail>) + this.ferryReservationDetails) + .addAll(elements); return this; } - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails(EmptyParam ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** Supplementary ferry reservation details. */ + public Builder setFerryReservationDetails( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail> + ferryReservationDetails) { + this.ferryReservationDetails = ferryReservationDetails; + return this; + } - @SerializedName("on_session") - ON_SESSION("on_session"); + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance + element) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .add(element); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all elements to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#insurances} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllInsurance( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + elements) { + if (this.insurances == null || this.insurances instanceof EmptyParam) { + this.insurances = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance>) + this.insurances) + .addAll(elements); + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Supplementary insurance details. */ + public Builder setInsurances(EmptyParam insurances) { + this.insurances = insurances; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - 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; + /** Supplementary insurance details. */ + public Builder setInsurances( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance> + insurances) { + this.insurances = insurances; + return this; + } - /** - * Preferred language of the Bancontact authorization page that the customer is redirected to. - */ - @SerializedName("preferred_language") - PreferredLanguage preferredLanguage; + /** + * Add an element to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addMarketplaceSeller( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller + element) { + if (this.marketplaceSellers == null || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .add(element); + 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}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + /** + * Add all elements to `marketplaceSellers` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#marketplaceSellers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllMarketplaceSeller( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + elements) { + if (this.marketplaceSellers == null || this.marketplaceSellers instanceof EmptyParam) { + this.marketplaceSellers = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller>) + this.marketplaceSellers) + .addAll(elements); + return this; + } - private Bancontact( - Map extraParams, - PreferredLanguage preferredLanguage, - ApiRequestParams.EnumParam setupFutureUsage) { - this.extraParams = extraParams; - this.preferredLanguage = preferredLanguage; - this.setupFutureUsage = setupFutureUsage; - } + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers(EmptyParam marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** Supplementary marketplace seller details. */ + public Builder setMarketplaceSellers( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller> + marketplaceSellers) { + this.marketplaceSellers = marketplaceSellers; + return this; + } + + /** + * Add an element to `roundTripReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addRoundTripReservationDetail( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail + element) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .add(element); + return this; + } + + /** + * Add all elements to `roundTripReservationDetails` list. A list is initialized for the + * first `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#roundTripReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllRoundTripReservationDetail( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + elements) { + if (this.roundTripReservationDetails == null + || this.roundTripReservationDetails instanceof EmptyParam) { + this.roundTripReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail>) + this.roundTripReservationDetails) + .addAll(elements); + return this; + } + + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails(EmptyParam roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Supplementary round trip reservation details. */ + public Builder setRoundTripReservationDetails( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail> + roundTripReservationDetails) { + this.roundTripReservationDetails = roundTripReservationDetails; + return this; + } - public static class Builder { - private Map extraParams; + /** + * Add an element to `trainReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addTrainReservationDetail( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail + element) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .add(element); + return this; + } - private PreferredLanguage preferredLanguage; + /** + * Add all elements to `trainReservationDetails` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#trainReservationDetails} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllTrainReservationDetail( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + elements) { + if (this.trainReservationDetails == null + || this.trainReservationDetails instanceof EmptyParam) { + this.trainReservationDetails = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail>) + this.trainReservationDetails) + .addAll(elements); + return this; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails(EmptyParam trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact( - this.extraParams, this.preferredLanguage, this.setupFutureUsage); - } + /** Supplementary train reservation details. */ + public Builder setTrainReservationDetails( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail> + trainReservationDetails) { + this.trainReservationDetails = trainReservationDetails; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add an element to `vouchers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addVoucher( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher + element) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .add(element); + return this; } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all elements to `vouchers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData#vouchers} + * for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllVoucher( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + elements) { + if (this.vouchers == null || this.vouchers instanceof EmptyParam) { + this.vouchers = + new ArrayList< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>(); + } + ((List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher>) + this.vouchers) + .addAll(elements); + return this; } - this.extraParams.putAll(map); - return this; - } - /** - * Preferred language of the Bancontact authorization page that the customer is redirected - * to. - */ - public Builder setPreferredLanguage( - PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact.PreferredLanguage - preferredLanguage) { - this.preferredLanguage = preferredLanguage; - return this; - } + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers(EmptyParam vouchers) { + this.vouchers = vouchers; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Bancontact.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; + /** Voucher details, such as a gift card or discount code. */ + public Builder setVouchers( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher> + vouchers) { + this.vouchers = vouchers; + 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; - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; - public enum PreferredLanguage implements ApiRequestParams.EnumParam { - @SerializedName("de") - DE("de"), + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; - @SerializedName("en") - EN("en"), + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; - @SerializedName("fr") - FR("fr"), + /** Currency. */ + @SerializedName("currency") + Object currency; - @SerializedName("nl") - NL("nl"); + /** Departure details. */ + @SerializedName("departure") + Departure departure; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - PreferredLanguage(String value) { - this.value = value; - } - } + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private BusReservationDetail( + Object affiliateName, + Arrival arrival, + Object carrierName, + Object currency, + Departure departure, + Map extraParams, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + insurances, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private Object affiliateName; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Arrival arrival; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Billie { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + private Object carrierName; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Object currency; - private Billie(ApiRequestParams.EnumParam captureMethod, Map extraParams) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - } + private Departure departure; - public static Builder builder() { - return new Builder(); - } + private Map extraParams; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance> + insurances; + + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } - private Map extraParams; + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Billie build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Billie( - this.captureMethod, this.extraParams); - } + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Departure details. */ + public Builder setDeparture( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure + departure) { + this.departure = departure; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Billie#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Billie#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#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 CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } - CaptureMethod(String value) { - this.value = value; - } - } - } + /** + * 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger + element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Blik { - /** - * The 6-digit BLIK code that a customer has generated using their banking application. Can - * only be set on confirmation. - */ - @SerializedName("code") - Object code; + /** + * 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + 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}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } - private Blik( - Object code, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.code = code; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - public static Builder builder() { - return new Builder(); - } + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; - public static class Builder { - private Object code; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Map extraParams; + private Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - private ApiRequestParams.EnumParam setupFutureUsage; + public static Builder builder() { + return new Builder(); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Blik build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Blik( - this.code, this.extraParams, this.setupFutureUsage); - } + public static class Builder { + private Address address; - /** - * The 6-digit BLIK code that a customer has generated using their banking application. Can - * only be set on confirmation. - */ - public Builder setCode(String code) { - this.code = code; - return this; - } + private Object arrivalLocation; - /** - * The 6-digit BLIK code that a customer has generated using their banking application. Can - * only be set on confirmation. - */ - public Builder setCode(EmptyParam code) { - this.code = code; - return this; - } + private Map extraParams; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.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; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.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; - } + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Blik.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + 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; - } - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Boleto { - /** - * The number of calendar days before a Boleto voucher expires. For example, if you create a - * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will - * expire on Wednesday at 23:59 America/Sao_Paulo time. - */ - @SerializedName("expires_after_days") - Long expiresAfterDays; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * 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; + public static Builder builder() { + return new Builder(); + } - private Boleto( - Long expiresAfterDays, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.expiresAfterDays = expiresAfterDays; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + public static class Builder { + private Object city; - public static Builder builder() { - return new Builder(); - } + private Object country; - public static class Builder { - private Long expiresAfterDays; + private Map extraParams; - private Map extraParams; + private Object postalCode; - private ApiRequestParams.EnumParam setupFutureUsage; + private Object region; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Boleto build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Boleto( - this.expiresAfterDays, this.extraParams, this.setupFutureUsage); - } + private Object streetAddress; - /** - * The number of calendar days before a Boleto voucher expires. For example, if you create a - * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will - * expire on Wednesday at 23:59 America/Sao_Paulo time. - */ - public Builder setExpiresAfterDays(Long expiresAfterDays) { - this.expiresAfterDays = expiresAfterDays; - return this; - } + private Object streetAddress2; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Boleto#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Boleto#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Boleto.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + 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; - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Arrival.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; + } - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @SerializedName("on_session") - ON_SESSION("on_session"); + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Card { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, the - * CVC value will be verified during the card payment attempt. This parameter can only be - * provided during confirmation. - */ - @SerializedName("cvc_token") - Object cvcToken; + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - @SerializedName("installments") - Installments installments; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - /** Configuration options for setting up an eMandate for cards issued in India. */ - @SerializedName("mandate_options") - MandateOptions mandateOptions; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - /** - * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail - * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided - * during confirmation. - */ - @SerializedName("moto") - Boolean moto; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - /** - * Selected network to process this PaymentIntent on. Depends on the available networks of the - * card attached to the PaymentIntent. Can be only set confirm-time. - */ - @SerializedName("network") - Network network; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - @SerializedName("request_decremental_authorization") - RequestDecrementalAuthorization requestDecrementalAuthorization; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Request ability to capture beyond the standard - * authorization validity window for this PaymentIntent. - */ - @SerializedName("request_extended_authorization") - RequestExtendedAuthorization requestExtendedAuthorization; + private Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - @SerializedName("request_incremental_authorization") - RequestIncrementalAuthorization requestIncrementalAuthorization; + public static Builder builder() { + return new Builder(); + } - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - @SerializedName("request_multicapture") - RequestMulticapture requestMulticapture; + public static class Builder { + private Address address; - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - @SerializedName("request_overcapture") - RequestOvercapture requestOvercapture; + private Long departsAt; - /** Request partial authorization on this PaymentIntent. */ - @SerializedName("request_partial_authorization") - RequestPartialAuthorization requestPartialAuthorization; + private Object departureLocation; - /** - * We strongly recommend that you rely on our SCA Engine to automatically prompt your - * customers for authentication based on risk level and other requirements. - * However, if you wish to request 3D Secure based on logic from your own fraud engine, - * provide this option. If not provided, this value defaults to {@code automatic}. Read our - * guide on manually - * requesting 3D Secure for more information on how this configuration interacts with - * Radar and our SCA Engine. - */ - @SerializedName("request_three_d_secure") - RequestThreeDSecure requestThreeDSecure; + private Map extraParams; - /** - * When enabled, using a card that is attached to a customer will require the CVC to be - * provided again (i.e. using the cvc_token parameter). - */ - @SerializedName("require_cvc_recollection") - Boolean requireCvcRecollection; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor - * that’s set on the account to form the complete statement descriptor. Maximum 22 characters. - * On card statements, the concatenation of both prefix and suffix (including - * separators) will appear truncated to 22 characters. - */ - @SerializedName("statement_descriptor_suffix_kana") - Object statementDescriptorSuffixKana; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } + + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 - * characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. - */ - @SerializedName("statement_descriptor_suffix_kanji") - Object statementDescriptorSuffixKanji; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. - */ - @SerializedName("statement_details") - Object statementDetails; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** - * If 3D Secure authentication was performed with a third-party provider, the authentication - * details to use for this payment. - */ - @SerializedName("three_d_secure") - ThreeDSecure threeDSecure; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - private Card( - ApiRequestParams.EnumParam captureMethod, - Object cvcToken, - Map extraParams, - Installments installments, - MandateOptions mandateOptions, - Boolean moto, - Network network, - RequestDecrementalAuthorization requestDecrementalAuthorization, - RequestExtendedAuthorization requestExtendedAuthorization, - RequestIncrementalAuthorization requestIncrementalAuthorization, - RequestMulticapture requestMulticapture, - RequestOvercapture requestOvercapture, - RequestPartialAuthorization requestPartialAuthorization, - RequestThreeDSecure requestThreeDSecure, - Boolean requireCvcRecollection, - ApiRequestParams.EnumParam setupFutureUsage, - Object statementDescriptorSuffixKana, - Object statementDescriptorSuffixKanji, - Object statementDetails, - ThreeDSecure threeDSecure) { - this.captureMethod = captureMethod; - this.cvcToken = cvcToken; - this.extraParams = extraParams; - this.installments = installments; - this.mandateOptions = mandateOptions; - this.moto = moto; - this.network = network; - this.requestDecrementalAuthorization = requestDecrementalAuthorization; - this.requestExtendedAuthorization = requestExtendedAuthorization; - this.requestIncrementalAuthorization = requestIncrementalAuthorization; - this.requestMulticapture = requestMulticapture; - this.requestOvercapture = requestOvercapture; - this.requestPartialAuthorization = requestPartialAuthorization; - this.requestThreeDSecure = requestThreeDSecure; - this.requireCvcRecollection = requireCvcRecollection; - this.setupFutureUsage = setupFutureUsage; - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; - this.statementDetails = statementDetails; - this.threeDSecure = threeDSecure; - } + public static Builder builder() { + return new Builder(); + } - public static Builder builder() { - return new Builder(); - } + public static class Builder { + private Object city; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + private Object country; - private Object cvcToken; + private Map extraParams; - private Map extraParams; + private Object postalCode; - private Installments installments; + private Object region; - private MandateOptions mandateOptions; + private Object streetAddress; - private Boolean moto; + private Object streetAddress2; - private Network network; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - private RequestDecrementalAuthorization requestDecrementalAuthorization; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private RequestExtendedAuthorization requestExtendedAuthorization; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - private RequestIncrementalAuthorization requestIncrementalAuthorization; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private RequestMulticapture requestMulticapture; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - private RequestOvercapture requestOvercapture; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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; + } - private RequestPartialAuthorization requestPartialAuthorization; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Departure.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; + } - private RequestThreeDSecure requestThreeDSecure; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - private Boolean requireCvcRecollection; + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - private Object statementDescriptorSuffixKana; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - private Object statementDescriptorSuffixKanji; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - private Object statementDetails; + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - private ThreeDSecure threeDSecure; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card( - this.captureMethod, - this.cvcToken, - this.extraParams, - this.installments, - this.mandateOptions, - this.moto, - this.network, - this.requestDecrementalAuthorization, - this.requestExtendedAuthorization, - this.requestIncrementalAuthorization, - this.requestMulticapture, - this.requestOvercapture, - this.requestPartialAuthorization, - this.requestThreeDSecure, - this.requireCvcRecollection, - this.setupFutureUsage, - this.statementDescriptorSuffixKana, - this.statementDescriptorSuffixKanji, - this.statementDetails, - this.threeDSecure); - } + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, - * the CVC value will be verified during the card payment attempt. This parameter can only - * be provided during confirmation. - */ - public Builder setCvcToken(String cvcToken) { - this.cvcToken = cvcToken; - return this; - } + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - /** - * A single-use {@code cvc_update} Token that represents a card CVC value. When provided, - * the CVC value will be verified during the card payment attempt. This parameter can only - * be provided during confirmation. - */ - public Builder setCvcToken(EmptyParam cvcToken) { - this.cvcToken = cvcToken; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Card#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public static class Builder { + private Object currency; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Card#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private Map extraParams; - /** - * Installment configuration for payments attempted on this PaymentIntent. - * - *

For more information, see the installments integration guide. - */ - public Builder setInstallments( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments installments) { - this.installments = installments; - return this; - } + private Object insuranceCompanyName; - /** Configuration options for setting up an eMandate for cards issued in India. */ - public Builder setMandateOptions( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions mandateOptions) { - this.mandateOptions = mandateOptions; - return this; - } + private InsuranceType insuranceType; - /** - * When specified, this parameter indicates that a transaction will be marked as MOTO (Mail - * Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided - * during confirmation. - */ - public Builder setMoto(Boolean moto) { - this.moto = moto; - return this; - } + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - /** - * Selected network to process this PaymentIntent on. Depends on the available networks of - * the card attached to the PaymentIntent. Can be only set confirm-time. - */ - public Builder setNetwork( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.Network network) { - this.network = network; - return this; - } + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - /** - * Request ability to decrement the - * authorization for this PaymentIntent. - */ - public Builder setRequestDecrementalAuthorization( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestDecrementalAuthorization - requestDecrementalAuthorization) { - this.requestDecrementalAuthorization = requestDecrementalAuthorization; - return this; - } + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } - /** - * Request ability to capture beyond the - * standard authorization validity window for this PaymentIntent. - */ - public Builder setRequestExtendedAuthorization( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestExtendedAuthorization - requestExtendedAuthorization) { - this.requestExtendedAuthorization = requestExtendedAuthorization; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Request ability to increment the - * authorization for this PaymentIntent. - */ - public Builder setRequestIncrementalAuthorization( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestIncrementalAuthorization - requestIncrementalAuthorization) { - this.requestIncrementalAuthorization = requestIncrementalAuthorization; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * Request ability to make multiple - * captures for this PaymentIntent. - */ - public Builder setRequestMulticapture( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestMulticapture - requestMulticapture) { - this.requestMulticapture = requestMulticapture; - return this; - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * Request ability to overcapture - * for this PaymentIntent. - */ - public Builder setRequestOvercapture( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestOvercapture - requestOvercapture) { - this.requestOvercapture = requestOvercapture; - return this; - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** Request partial authorization on this PaymentIntent. */ - public Builder setRequestPartialAuthorization( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestPartialAuthorization - requestPartialAuthorization) { - this.requestPartialAuthorization = requestPartialAuthorization; - return this; - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** - * We strongly recommend that you rely on our SCA Engine to automatically prompt your - * customers for authentication based on risk level and other requirements. - * However, if you wish to request 3D Secure based on logic from your own fraud engine, - * provide this option. If not provided, this value defaults to {@code automatic}. Read our - * guide on manually - * requesting 3D Secure for more information on how this configuration interacts with - * Radar and our SCA Engine. - */ - public Builder setRequestThreeDSecure( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.RequestThreeDSecure - requestThreeDSecure) { - this.requestThreeDSecure = requestThreeDSecure; - return this; - } + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - /** - * When enabled, using a card that is attached to a customer will require the CVC to be - * provided again (i.e. using the cvc_token parameter). - */ - public Builder setRequireCvcRecollection(Boolean requireCvcRecollection) { - this.requireCvcRecollection = requireCvcRecollection; - return this; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * 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; - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 22 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 22 characters. - */ - public Builder setStatementDescriptorSuffixKana(String statementDescriptorSuffixKana) { - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; - return this; - } + @SerializedName("emergency") + EMERGENCY("emergency"), - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 22 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 22 characters. - */ - public Builder setStatementDescriptorSuffixKana(EmptyParam statementDescriptorSuffixKana) { - this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; - return this; - } + @SerializedName("medical") + MEDICAL("medical"); - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 17 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. - */ - public Builder setStatementDescriptorSuffixKanji(String statementDescriptorSuffixKanji) { - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Provides information about a card payment that customers see on their statements. - * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement - * descriptor that’s set on the account to form the complete statement descriptor. Maximum - * 17 characters. On card statements, the concatenation of both prefix and suffix - * (including separators) will appear truncated to 17 characters. - */ - public Builder setStatementDescriptorSuffixKanji( - EmptyParam statementDescriptorSuffixKanji) { - this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; - return this; - } + InsuranceType(String value) { + this.value = value; + } + } + } - /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. - */ - public Builder setStatementDetails( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails statementDetails) { - this.statementDetails = statementDetails; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * Statement details for this payment intent. You can use this to override the merchant - * details shown on your customers' statements. - */ - public Builder setStatementDetails(EmptyParam statementDetails) { - this.statementDetails = statementDetails; - return this; - } + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; - /** - * If 3D Secure authentication was performed with a third-party provider, the authentication - * details to use for this payment. - */ - public Builder setThreeDSecure( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { - this.threeDSecure = threeDSecure; - return this; - } - } + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Installments { - /** - * Setting to true enables installments for this PaymentIntent. This will cause the response - * to contain a list of available installment plans. Setting to false will prevent any - * selected plan from applying to a charge. - */ - @SerializedName("enabled") - Boolean enabled; + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - /** - * The selected installment plan to use for this payment attempt. This parameter can only be - * provided during confirmation. - */ - @SerializedName("plan") - Object plan; + public static class Builder { + private Map extraParams; - private Installments(Boolean enabled, Map extraParams, Object plan) { - this.enabled = enabled; - this.extraParams = extraParams; - this.plan = plan; - } + private Object familyName; - public static Builder builder() { - return new Builder(); - } + private Object givenName; - public static class Builder { - private Boolean enabled; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .BusReservationDetail.Passenger + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.BusReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - private Map extraParams; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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; + } - private Object plan; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.BusReservationDetail.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments( - this.enabled, this.extraParams, this.plan); - } + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - /** - * Setting to true enables installments for this PaymentIntent. This will cause the - * response to contain a list of available installment plans. Setting to false will - * prevent any selected plan from applying to a charge. - */ - public Builder setEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } } - this.extraParams.putAll(map); - return this; } - /** - * The selected installment plan to use for this payment attempt. This parameter can only - * be provided during confirmation. - */ - public Builder setPlan( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan plan) { - this.plan = plan; - return this; - } + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** - * The selected installment plan to use for this payment attempt. This parameter can only - * be provided during confirmation. - */ - public Builder setPlan(EmptyParam plan) { - this.plan = plan; - return this; + @SerializedName("economy") + ECONOMY("economy"), + + @SerializedName("first_class") + FIRST_CLASS("first_class"), + + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TicketClass(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Plan { - /** - * For {@code fixed_count} installment plans, this is required. It represents the number - * of installment payments your customer will make to their credit card. - */ - @SerializedName("count") - Long count; + public static class EventReservationDetail { + /** Indicates if the tickets are digitally checked when entering the venue. */ + @SerializedName("access_controlled_venue") + Boolean accessControlledVenue; + + /** Address of the event. */ + @SerializedName("address") + Address address; + + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** End timestamp of the event. */ + @SerializedName("ends_at") + Long endsAt; + + /** Company selling the ticket. */ + @SerializedName("event_company_name") + Object eventCompanyName; + + /** Name of the event. */ + @SerializedName("event_name") + Object eventName; + + /** Type of the event. */ + @SerializedName("event_type") + EventType eventType; /** * Map of extra parameters for custom features not available in this client library. The @@ -19688,26 +33010,47 @@ public static class Plan { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * For {@code fixed_count} installment plans, this is required. It represents the interval - * between installment payments your customer will make to their credit card. One of - * {@code month}. - */ - @SerializedName("interval") - Interval interval; - - /** - * Required. Type of installment plan, one of {@code fixed_count}, {@code - * bonus}, or {@code revolving}. - */ - @SerializedName("type") - Type type; - - private Plan(Long count, Map extraParams, Interval interval, Type type) { - this.count = count; + /** List of insurances for this event. */ + @SerializedName("insurances") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance> + insurances; + + /** Start timestamp of the event. */ + @SerializedName("starts_at") + Long startsAt; + + /** Name of the venue where the event takes place. */ + @SerializedName("venue_name") + Object venueName; + + private EventReservationDetail( + Boolean accessControlledVenue, + Address address, + Object affiliateName, + Long endsAt, + Object eventCompanyName, + Object eventName, + EventType eventType, + Map extraParams, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + insurances, + Long startsAt, + Object venueName) { + this.accessControlledVenue = accessControlledVenue; + this.address = address; + this.affiliateName = affiliateName; + this.endsAt = endsAt; + this.eventCompanyName = eventCompanyName; + this.eventName = eventName; + this.eventType = eventType; this.extraParams = extraParams; - this.interval = interval; - this.type = type; + this.insurances = insurances; + this.startsAt = startsAt; + this.venueName = venueName; } public static Builder builder() { @@ -19715,26 +33058,113 @@ public static Builder builder() { } public static class Builder { - private Long count; + private Boolean accessControlledVenue; + + private Address address; + + private Object affiliateName; + + private Long endsAt; + + private Object eventCompanyName; + + private Object eventName; + + private EventType eventType; private Map extraParams; - private Interval interval; + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance> + insurances; - private Type type; + private Long startsAt; + + private Object venueName; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan( - this.count, this.extraParams, this.interval, this.type); + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail( + this.accessControlledVenue, + this.address, + this.affiliateName, + this.endsAt, + this.eventCompanyName, + this.eventName, + this.eventType, + this.extraParams, + this.insurances, + this.startsAt, + this.venueName); } - /** - * For {@code fixed_count} installment plans, this is required. It represents the number - * of installment payments your customer will make to their credit card. - */ - public Builder setCount(Long count) { - this.count = count; + /** Indicates if the tickets are digitally checked when entering the venue. */ + public Builder setAccessControlledVenue(Boolean accessControlledVenue) { + this.accessControlledVenue = accessControlledVenue; + return this; + } + + /** Address of the event. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Address + address) { + this.address = address; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** End timestamp of the event. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; + return this; + } + + /** Company selling the ticket. */ + public Builder setEventCompanyName(String eventCompanyName) { + this.eventCompanyName = eventCompanyName; + return this; + } + + /** Company selling the ticket. */ + public Builder setEventCompanyName(EmptyParam eventCompanyName) { + this.eventCompanyName = eventCompanyName; + return this; + } + + /** Name of the event. */ + public Builder setEventName(String eventName) { + this.eventName = eventName; + return this; + } + + /** Name of the event. */ + public Builder setEventName(EmptyParam eventName) { + this.eventName = eventName; + return this; + } + + /** Type of the event. */ + public Builder setEventType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.EventType + eventType) { + this.eventType = eventType; return this; } @@ -19742,7 +33172,7 @@ public Builder setCount(Long count) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -19757,7 +33187,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -19769,512 +33199,470 @@ public Builder putAllExtraParam(Map map) { } /** - * For {@code fixed_count} installment plans, this is required. It represents the - * interval between installment payments your customer will make to their credit card. - * One of {@code month}. + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. */ - public Builder setInterval( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan.Interval - interval) { - this.interval = interval; + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } /** - * Required. Type of installment plan, one of {@code fixed_count}, - * {@code bonus}, or {@code revolving}. + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail#insurances} + * for the field documentation. */ - public Builder setType( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { - this.type = type; + public Builder addAllInsurance( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); return this; } - } - - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("month") - MONTH("month"); - - @Getter(onMethod_ = {@Override}) - private final String value; - Interval(String value) { - this.value = value; + /** Start timestamp of the event. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; } - } - - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("bonus") - BONUS("bonus"), - - @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"), - - @SerializedName("revolving") - REVOLVING("revolving"); - @Getter(onMethod_ = {@Override}) - private final String value; + /** Name of the venue where the event takes place. */ + public Builder setVenueName(String venueName) { + this.venueName = venueName; + return this; + } - Type(String value) { - this.value = value; + /** Name of the venue where the event takes place. */ + public Builder setVenueName(EmptyParam venueName) { + this.venueName = venueName; + return this; } } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class MandateOptions { - /** Required. Amount to be charged for future payments. */ - @SerializedName("amount") - Long amount; - - /** - * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, the - * {@code amount} param refers to the exact amount to be charged in future payments. If - * {@code maximum}, the amount charged can be up to the value passed for the {@code amount} - * param. - */ - @SerializedName("amount_type") - AmountType amountType; - - /** - * A description of the mandate or subscription that is meant to be displayed to the - * customer. - */ - @SerializedName("description") - Object description; - - /** - * End date of the mandate or subscription. If not provided, the mandate will be active - * until canceled. If provided, end date should be after start date. - */ - @SerializedName("end_date") - Long endDate; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. Specifies payment frequency. One of {@code day}, {@code week}, - * {@code month}, {@code year}, or {@code sporadic}. - */ - @SerializedName("interval") - Interval interval; - - /** - * The number of intervals between payments. For example, {@code interval=month} and {@code - * interval_count=3} indicates one payment every three months. Maximum of one year interval - * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code - * interval=sporadic}. - */ - @SerializedName("interval_count") - Long intervalCount; - /** Required. Unique identifier for the mandate or subscription. */ - @SerializedName("reference") - Object reference; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * Required. Start date of the mandate or subscription. Start date should - * not be lesser than yesterday. - */ - @SerializedName("start_date") - Long startDate; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** Specifies the type of mandates supported. Possible values are {@code india}. */ - @SerializedName("supported_types") - List - supportedTypes; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private MandateOptions( - Long amount, - AmountType amountType, - Object description, - Long endDate, - Map extraParams, - Interval interval, - Long intervalCount, - Object reference, - Long startDate, - List - supportedTypes) { - this.amount = amount; - this.amountType = amountType; - this.description = description; - this.endDate = endDate; - this.extraParams = extraParams; - this.interval = interval; - this.intervalCount = intervalCount; - this.reference = reference; - this.startDate = startDate; - this.supportedTypes = supportedTypes; - } + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - public static Builder builder() { - return new Builder(); - } + public static Builder builder() { + return new Builder(); + } - public static class Builder { - private Long amount; + public static class Builder { + private Object city; - private AmountType amountType; + private Object country; - private Object description; + private Map extraParams; - private Long endDate; + private Object postalCode; - private Map extraParams; + private Object region; - private Interval interval; + private Object streetAddress; - private Long intervalCount; + private Object streetAddress2; - private Object reference; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - private Long startDate; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private List< - PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> - supportedTypes; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions( - this.amount, - this.amountType, - this.description, - this.endDate, - this.extraParams, - this.interval, - this.intervalCount, - this.reference, - this.startDate, - this.supportedTypes); - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - /** Required. Amount to be charged for future payments. */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - /** - * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, - * the {@code amount} param refers to the exact amount to be charged in future payments. - * If {@code maximum}, the amount charged can be up to the value passed for the {@code - * amount} param. - */ - public Builder setAmountType( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.AmountType - amountType) { - this.amountType = amountType; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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; + } - /** - * A description of the mandate or subscription that is meant to be displayed to the - * customer. - */ - public Builder setDescription(String description) { - this.description = description; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.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; + } - /** - * A description of the mandate or subscription that is meant to be displayed to the - * customer. - */ - public Builder setDescription(EmptyParam description) { - this.description = description; - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * End date of the mandate or subscription. If not provided, the mandate will be active - * until canceled. If provided, end date should be after start date. - */ - public Builder setEndDate(Long endDate) { - this.endDate = endDate; - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - /** - * Required. Specifies payment frequency. One of {@code day}, {@code - * week}, {@code month}, {@code year}, or {@code sporadic}. - */ - public Builder setInterval( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.Interval - interval) { - this.interval = interval; - return this; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** - * The number of intervals between payments. For example, {@code interval=month} and - * {@code interval_count=3} indicates one payment every three months. Maximum of one year - * interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when - * {@code interval=sporadic}. - */ - public Builder setIntervalCount(Long intervalCount) { - this.intervalCount = intervalCount; - return this; - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - /** Required. Unique identifier for the mandate or subscription. */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - /** Required. Unique identifier for the mandate or subscription. */ - public Builder setReference(EmptyParam reference) { - this.reference = reference; - return this; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } } - /** - * Required. Start date of the mandate or subscription. Start date should - * not be lesser than yesterday. - */ - public Builder setStartDate(Long startDate) { - this.startDate = startDate; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; - /** - * Add an element to `supportedTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for - * the field documentation. - */ - public Builder addSupportedType( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType - element) { - if (this.supportedTypes == null) { - this.supportedTypes = new ArrayList<>(); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; } - this.supportedTypes.add(element); - return this; - } - /** - * Add all elements to `supportedTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for - * the field documentation. - */ - public Builder addAllSupportedType( - List - elements) { - if (this.supportedTypes == null) { - this.supportedTypes = new ArrayList<>(); + public static Builder builder() { + return new Builder(); } - this.supportedTypes.addAll(elements); - return this; - } - } - public enum AmountType implements ApiRequestParams.EnumParam { - @SerializedName("fixed") - FIXED("fixed"), + public static class Builder { + private Object currency; - @SerializedName("maximum") - MAXIMUM("maximum"); + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object insuranceCompanyName; - AmountType(String value) { - this.value = value; - } - } + private InsuranceType insuranceType; - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + private Long price; - @SerializedName("month") - MONTH("month"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.EventReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - @SerializedName("sporadic") - SPORADIC("sporadic"), + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @SerializedName("week") - WEEK("week"), + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } - @SerializedName("year") - YEAR("year"); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.EventReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - Interval(String value) { - this.value = value; - } - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - public enum SupportedType implements ApiRequestParams.EnumParam { - @SerializedName("india") - INDIA("india"); + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .EventReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - SupportedType(String value) { - this.value = value; - } - } - } + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class StatementDetails { - /** Please pass in an address that is within your Stripe user account country. */ - @SerializedName("address") - Address address; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** Phone number (e.g., a toll-free number that customers can call). */ - @SerializedName("phone") - Object phone; + @SerializedName("emergency") + EMERGENCY("emergency"), - private StatementDetails(Address address, Map extraParams, Object phone) { - this.address = address; - this.extraParams = extraParams; - this.phone = phone; - } + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } - public static Builder builder() { - return new Builder(); - } + public enum EventType implements ApiRequestParams.EnumParam { + @SerializedName("concert") + CONCERT("concert"), - public static class Builder { - private Address address; + @SerializedName("conference") + CONFERENCE("conference"), - private Map extraParams; + @SerializedName("digital_education") + DIGITAL_EDUCATION("digital_education"), - private Object phone; + @SerializedName("expo") + EXPO("expo"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails( - this.address, this.extraParams, this.phone); - } + @SerializedName("festival") + FESTIVAL("festival"), - /** Please pass in an address that is within your Stripe user account country. */ - public Builder setAddress( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails.Address - address) { - this.address = address; - return this; - } + @SerializedName("in_person_education") + IN_PERSON_EDUCATION("in_person_education"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("sport") + SPORT("sport"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("tour") + TOUR("tour"); - /** Phone number (e.g., a toll-free number that customers can call). */ - public Builder setPhone(String phone) { - this.phone = phone; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** Phone number (e.g., a toll-free number that customers can call). */ - public Builder setPhone(EmptyParam phone) { - this.phone = phone; - return this; + EventType(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Address { - /** City, district, suburb, town, or village. */ - @SerializedName("city") - Object city; + public static class FerryReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; - /** - * Two-letter country code (ISO - * 3166-1 alpha-2). - */ - @SerializedName("country") - Object country; + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Currency. */ + @SerializedName("currency") + Object currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; /** * Map of extra parameters for custom features not available in this client library. The @@ -20286,37 +33674,55 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1, such as the street, PO Box, or company name. */ - @SerializedName("line1") - Object line1; - - /** Address line 2, such as the apartment, suite, unit, or building. */ - @SerializedName("line2") - Object line2; - - /** ZIP or postal code. */ - @SerializedName("postal_code") - Object postalCode; - - /** State, county, province, or region. */ - @SerializedName("state") - Object state; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; - private Address( - Object city, - Object country, + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private FerryReservationDetail( + Object affiliateName, + Arrival arrival, + Object carrierName, + Object currency, + Departure departure, Map extraParams, - Object line1, - Object line2, - Object postalCode, - Object state) { - this.city = city; - this.country = country; + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + insurances, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; this.extraParams = extraParams; - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.state = state; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } public static Builder builder() { @@ -20324,61 +33730,101 @@ public static Builder builder() { } public static class Builder { - private Object city; + private Object affiliateName; - private Object country; + private Arrival arrival; + + private Object carrierName; + + private Object currency; + + private Departure departure; private Map extraParams; - private Object line1; + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance> + insurances; - private Object line2; + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger> + passengers; - private Object postalCode; + private Long price; - private Object state; + private TicketClass ticketClass; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails.Address + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails - .Address( - this.city, - this.country, + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, this.extraParams, - this.line1, - this.line2, - this.postalCode, - this.state); + this.insurances, + this.passengers, + this.price, + this.ticketClass); } - /** City, district, suburb, town, or village. */ - public Builder setCity(String city) { - this.city = city; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; return this; } - /** City, district, suburb, town, or village. */ - public Builder setCity(EmptyParam city) { - this.city = city; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; return this; } - /** - * Two-letter country code (ISO 3166-1 alpha-2). - */ - public Builder setCountry(String country) { - this.country = country; + /** Arrival details. */ + public Builder setArrival( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival + arrival) { + this.arrival = arrival; return this; } - /** - * Two-letter country code (ISO 3166-1 alpha-2). - */ - public Builder setCountry(EmptyParam country) { - this.country = country; + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure + departure) { + this.departure = departure; return this; } @@ -20386,7 +33832,7 @@ public Builder setCountry(EmptyParam country) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails.Address#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -20401,7 +33847,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.StatementDetails.Address#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -20412,417 +33858,401 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(String line1) { - this.line1 = line1; - return this; - } - - /** Address line 1, such as the street, PO Box, or company name. */ - public Builder setLine1(EmptyParam line1) { - this.line1 = line1; - return this; - } - - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(String line2) { - this.line2 = line2; - return this; - } - - /** Address line 2, such as the apartment, suite, unit, or building. */ - public Builder setLine2(EmptyParam line2) { - this.line2 = line2; - return this; - } - - /** ZIP or postal code. */ - public Builder setPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } - - /** ZIP or postal code. */ - public Builder setPostalCode(EmptyParam postalCode) { - this.postalCode = postalCode; - return this; - } - - /** State, county, province, or region. */ - public Builder setState(String state) { - this.state = state; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); return this; } - /** State, county, province, or region. */ - public Builder setState(EmptyParam state) { - this.state = state; + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); return this; } - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class ThreeDSecure { - /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ - @SerializedName("ares_trans_status") - AresTransStatus aresTransStatus; - - /** - * Required. The cryptogram, also known as the "authentication - * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a - * 28-character string. (Most 3D Secure providers will return the base64-encoded version, - * which is what you should specify here.) - */ - @SerializedName("cryptogram") - Object cryptogram; - - /** - * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and - * indicates what degree of authentication was performed. - */ - @SerializedName("electronic_commerce_indicator") - ElectronicCommerceIndicator electronicCommerceIndicator; - - /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ - @SerializedName("exemption_indicator") - ExemptionIndicator exemptionIndicator; - - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - /** - * Network specific 3DS fields. Network specific arguments require an explicit card brand - * choice. The parameter `payment_method_options.card.network`` must be populated - * accordingly - */ - @SerializedName("network_options") - NetworkOptions networkOptions; + /** + * 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger + element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - /** - * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the - * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - */ - @SerializedName("requestor_challenge_indicator") - Object requestorChallengeIndicator; + /** + * 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - @SerializedName("transaction_id") - Object transactionId; + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } - /** Required. The version of 3D Secure that was performed. */ - @SerializedName("version") - Version version; + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } + } - private ThreeDSecure( - AresTransStatus aresTransStatus, - Object cryptogram, - ElectronicCommerceIndicator electronicCommerceIndicator, - ExemptionIndicator exemptionIndicator, - Map extraParams, - NetworkOptions networkOptions, - Object requestorChallengeIndicator, - Object transactionId, - Version version) { - this.aresTransStatus = aresTransStatus; - this.cryptogram = cryptogram; - this.electronicCommerceIndicator = electronicCommerceIndicator; - this.exemptionIndicator = exemptionIndicator; - this.extraParams = extraParams; - this.networkOptions = networkOptions; - this.requestorChallengeIndicator = requestorChallengeIndicator; - this.transactionId = transactionId; - this.version = version; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - public static Builder builder() { - return new Builder(); - } + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; - public static class Builder { - private AresTransStatus aresTransStatus; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Object cryptogram; + private Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - private ElectronicCommerceIndicator electronicCommerceIndicator; + public static Builder builder() { + return new Builder(); + } - private ExemptionIndicator exemptionIndicator; + public static class Builder { + private Address address; - private Map extraParams; + private Object arrivalLocation; - private NetworkOptions networkOptions; + private Map extraParams; - private Object requestorChallengeIndicator; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } - private Object transactionId; + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - private Version version; + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure( - this.aresTransStatus, - this.cryptogram, - this.electronicCommerceIndicator, - this.exemptionIndicator, - this.extraParams, - this.networkOptions, - this.requestorChallengeIndicator, - this.transactionId, - this.version); - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ - public Builder setAresTransStatus( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus - aresTransStatus) { - this.aresTransStatus = aresTransStatus; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * Required. The cryptogram, also known as the "authentication - * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a - * 28-character string. (Most 3D Secure providers will return the base64-encoded version, - * which is what you should specify here.) - */ - public Builder setCryptogram(String cryptogram) { - this.cryptogram = cryptogram; - return this; - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival#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 cryptogram, also known as the "authentication - * value" (AAV, CAVV or AEVV). This value is 20 bytes, base64-encoded into a - * 28-character string. (Most 3D Secure providers will return the base64-encoded version, - * which is what you should specify here.) - */ - public Builder setCryptogram(EmptyParam cryptogram) { - this.cryptogram = cryptogram; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and - * indicates what degree of authentication was performed. - */ - public Builder setElectronicCommerceIndicator( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure - .ElectronicCommerceIndicator - electronicCommerceIndicator) { - this.electronicCommerceIndicator = electronicCommerceIndicator; - return this; - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** The exemption requested via 3DS and accepted by the issuer at authentication time. */ - public Builder setExemptionIndicator( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.ExemptionIndicator - exemptionIndicator) { - this.exemptionIndicator = exemptionIndicator; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + public static class Builder { + private Object city; - /** - * Network specific 3DS fields. Network specific arguments require an explicit card brand - * choice. The parameter `payment_method_options.card.network`` must be populated - * accordingly - */ - public Builder setNetworkOptions( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - networkOptions) { - this.networkOptions = networkOptions; - return this; - } + private Object country; - /** - * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in - * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - */ - public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { - this.requestorChallengeIndicator = requestorChallengeIndicator; - return this; - } + private Map extraParams; - /** - * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in - * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - */ - public Builder setRequestorChallengeIndicator(EmptyParam requestorChallengeIndicator) { - this.requestorChallengeIndicator = requestorChallengeIndicator; - return this; - } + private Object postalCode; - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - public Builder setTransactionId(String transactionId) { - this.transactionId = transactionId; - return this; - } + private Object region; - /** - * Required. For 3D Secure 1, the XID. For 3D Secure 2, the Directory - * Server Transaction ID (dsTransID). - */ - public Builder setTransactionId(EmptyParam transactionId) { - this.transactionId = transactionId; - return this; - } + private Object streetAddress; - /** Required. The version of 3D Secure that was performed. */ - public Builder setVersion( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { - this.version = version; - return this; - } - } + private Object streetAddress2; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class NetworkOptions { - /** Cartes Bancaires-specific 3DS fields. */ - @SerializedName("cartes_bancaires") - CartesBancaires cartesBancaires; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { - this.cartesBancaires = cartesBancaires; - this.extraParams = extraParams; - } + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - public static class Builder { - private CartesBancaires cartesBancaires; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - private Map extraParams; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure - .NetworkOptions(this.cartesBancaires, this.extraParams); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Arrival.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; + } - /** Cartes Bancaires-specific 3DS fields. */ - public Builder setCartesBancaires( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires - cartesBancaires) { - this.cartesBancaires = cartesBancaires; - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } } - this.extraParams.putAll(map); - return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class CartesBancaires { - /** - * Required. The cryptogram calculation algorithm used by the card - * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code - * cavvAlgorithm}. messageExtension: CB-AVALGO - */ - @SerializedName("cb_avalgo") - CbAvalgo cbAvalgo; + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - /** - * The exemption indicator returned from Cartes Bancaires in the ARes. message - * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low - * significant byte first and most significant bit first) that has been Base64 encoded - */ - @SerializedName("cb_exemption") - Object cbExemption; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - /** - * The risk score returned from Cartes Bancaires in the ARes. message extension: - * CB-SCORE; numeric value 0-99 - */ - @SerializedName("cb_score") - Long cbScore; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; /** * Map of extra parameters for custom features not available in this client library. The @@ -20834,14 +34264,14 @@ public static class CartesBancaires { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CartesBancaires( - CbAvalgo cbAvalgo, - Object cbExemption, - Long cbScore, + private Departure( + Address address, + Long departsAt, + Object departureLocation, Map extraParams) { - this.cbAvalgo = cbAvalgo; - this.cbExemption = cbExemption; - this.cbScore = cbScore; + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; this.extraParams = extraParams; } @@ -20850,62 +34280,47 @@ public static Builder builder() { } public static class Builder { - private CbAvalgo cbAvalgo; + private Address address; - private Object cbExemption; + private Long departsAt; - private Long cbScore; + private Object departureLocation; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure - .NetworkOptions.CartesBancaires( - this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); } - /** - * Required. The cryptogram calculation algorithm used by the card - * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code - * cavvAlgorithm}. messageExtension: CB-AVALGO - */ - public Builder setCbAvalgo( - PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions - .CartesBancaires.CbAvalgo - cbAvalgo) { - this.cbAvalgo = cbAvalgo; + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Departure.Address + address) { + this.address = address; return this; } - /** - * The exemption indicator returned from Cartes Bancaires in the ARes. message - * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low - * significant byte first and most significant bit first) that has been Base64 encoded - */ - public Builder setCbExemption(String cbExemption) { - this.cbExemption = cbExemption; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; return this; } - /** - * The exemption indicator returned from Cartes Bancaires in the ARes. message - * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low - * significant byte first and most significant bit first) that has been Base64 encoded - */ - public Builder setCbExemption(EmptyParam cbExemption) { - this.cbExemption = cbExemption; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; return this; } - /** - * The risk score returned from Cartes Bancaires in the ARes. message extension: - * CB-SCORE; numeric value 0-99 - */ - public Builder setCbScore(Long cbScore) { - this.cbScore = cbScore; + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; return this; } @@ -20913,7 +34328,7 @@ public Builder setCbScore(Long cbScore) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -20928,7 +34343,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -20940,1288 +34355,1333 @@ public Builder putAllExtraParam(Map map) { } } - public enum CbAvalgo implements ApiRequestParams.EnumParam { - @SerializedName("0") - N0("0"), - - @SerializedName("1") - N1("1"), - - @SerializedName("2") - N2("2"), - - @SerializedName("3") - N3("3"), - - @SerializedName("4") - N4("4"), - - @SerializedName("A") - A("A"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - CbAvalgo(String value) { - this.value = value; + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; } - } - } - } - - public enum AresTransStatus implements ApiRequestParams.EnumParam { - @SerializedName("A") - A("A"), - - @SerializedName("C") - C("C"), - @SerializedName("I") - I("I"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("N") - N("N"), + public static class Builder { + private Object city; - @SerializedName("R") - R("R"), + private Object country; - @SerializedName("U") - U("U"), + private Map extraParams; - @SerializedName("Y") - Y("Y"); + private Object postalCode; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object region; - AresTransStatus(String value) { - this.value = value; - } - } + private Object streetAddress; - public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { - @SerializedName("01") - N01("01"), + private Object streetAddress2; - @SerializedName("02") - N02("02"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - @SerializedName("05") - N05("05"), + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @SerializedName("06") - N06("06"), + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - @SerializedName("07") - N07("07"); + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - ElectronicCommerceIndicator(String value) { - this.value = value; - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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; + } - public enum ExemptionIndicator implements ApiRequestParams.EnumParam { - @SerializedName("low_risk") - LOW_RISK("low_risk"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Departure.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; + } - @SerializedName("none") - NONE("none"); + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - ExemptionIndicator(String value) { - this.value = value; - } - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - public enum Version implements ApiRequestParams.EnumParam { - @SerializedName("1.0.2") - N1__0__2("1.0.2"), + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - @SerializedName("2.1.0") - N2__1__0("2.1.0"), + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - @SerializedName("2.2.0") - N2__2__0("2.2.0"); + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - Version(String value) { - this.value = value; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } } - } - } - - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; - CaptureMethod(String value) { - this.value = value; - } - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public enum Network implements ApiRequestParams.EnumParam { - @SerializedName("amex") - AMEX("amex"), + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - @SerializedName("cartes_bancaires") - CARTES_BANCAIRES("cartes_bancaires"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("diners") - DINERS("diners"), + public static class Builder { + private Object currency; - @SerializedName("discover") - DISCOVER("discover"), + private Map extraParams; - @SerializedName("eftpos_au") - EFTPOS_AU("eftpos_au"), + private Object insuranceCompanyName; - @SerializedName("girocard") - GIROCARD("girocard"), + private InsuranceType insuranceType; - @SerializedName("interac") - INTERAC("interac"), + private Long price; - @SerializedName("jcb") - JCB("jcb"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - @SerializedName("link") - LINK("link"), + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @SerializedName("mastercard") - MASTERCARD("mastercard"), + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } - @SerializedName("unionpay") - UNIONPAY("unionpay"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("unknown") - UNKNOWN("unknown"), + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - @SerializedName("visa") - VISA("visa"); + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - Network(String value) { - this.value = value; - } - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } - @SerializedName("never") - NEVER("never"); + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - RequestDecrementalAuthorization(String value) { - this.value = value; - } - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + @SerializedName("emergency") + EMERGENCY("emergency"), - @SerializedName("never") - NEVER("never"); + @SerializedName("medical") + MEDICAL("medical"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - RequestExtendedAuthorization(String value) { - this.value = value; - } - } + InsuranceType(String value) { + this.value = value; + } + } + } - public enum RequestIncrementalAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - @SerializedName("never") - NEVER("never"); + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; - @Getter(onMethod_ = {@Override}) - private final String value; + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; - RequestIncrementalAuthorization(String value) { - this.value = value; - } - } + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - public enum RequestMulticapture implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("never") - NEVER("never"); + public static class Builder { + private Map extraParams; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object familyName; - RequestMulticapture(String value) { - this.value = value; - } - } + private Object givenName; - public enum RequestOvercapture implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .FerryReservationDetail.Passenger + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.FerryReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - @SerializedName("never") - NEVER("never"); + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.FerryReservationDetail.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; + } - RequestOvercapture(String value) { - this.value = value; - } - } + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - public enum RequestPartialAuthorization implements ApiRequestParams.EnumParam { - @SerializedName("if_available") - IF_AVAILABLE("if_available"), + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } - @SerializedName("never") - NEVER("never"); + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + } + } - RequestPartialAuthorization(String value) { - this.value = value; - } - } + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { - @SerializedName("any") - ANY("any"), + @SerializedName("economy") + ECONOMY("economy"), - @SerializedName("automatic") - AUTOMATIC("automatic"), + @SerializedName("first_class") + FIRST_CLASS("first_class"), - @SerializedName("challenge") - CHALLENGE("challenge"); + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - RequestThreeDSecure(String value) { - this.value = value; + TicketClass(String value) { + this.value = value; + } + } } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; - @SerializedName("off_session") - OFF_SESSION("off_session"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("on_session") - ON_SESSION("on_session"); + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CardPresent { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - CaptureMethod captureMethod; + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + public static Builder builder() { + return new Builder(); + } - /** - * Request ability to capture this payment beyond the standard authorization - * validity window. - */ - @SerializedName("request_extended_authorization") - Boolean requestExtendedAuthorization; + public static class Builder { + private Object currency; - /** - * Request ability to increment - * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response - * to verify support. - */ - @SerializedName("request_incremental_authorization_support") - Boolean requestIncrementalAuthorizationSupport; + private Map extraParams; - /** - * Network routing priority on co-branded EMV cards supporting domestic debit and - * international card schemes. - */ - @SerializedName("routing") - Routing routing; + private Object insuranceCompanyName; - private CardPresent( - CaptureMethod captureMethod, - Map extraParams, - Boolean requestExtendedAuthorization, - Boolean requestIncrementalAuthorizationSupport, - Routing routing) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.requestExtendedAuthorization = requestExtendedAuthorization; - this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; - this.routing = routing; - } + private InsuranceType insuranceType; - public static Builder builder() { - return new Builder(); - } + private Long price; - public static class Builder { - private CaptureMethod captureMethod; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - private Map extraParams; + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - private Boolean requestExtendedAuthorization; + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } - private Boolean requestIncrementalAuthorizationSupport; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Routing routing; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent( - this.captureMethod, - this.extraParams, - this.requestExtendedAuthorization, - this.requestIncrementalAuthorizationSupport, - this.routing); - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.CaptureMethod - captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } } - this.extraParams.putAll(map); - return this; - } - /** - * Request ability to capture this payment beyond the standard authorization - * validity window. - */ - public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { - this.requestExtendedAuthorization = requestExtendedAuthorization; - return this; - } + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - /** - * Request ability to increment - * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response - * to verify support. - */ - public Builder setRequestIncrementalAuthorizationSupport( - Boolean requestIncrementalAuthorizationSupport) { - this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; - return this; - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - /** - * Network routing priority on co-branded EMV cards supporting domestic debit and - * international card schemes. - */ - public Builder setRouting( - PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing routing) { - this.routing = routing; - return this; + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Routing { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSeller { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 references to line items for purchases with multiple associated sub-sellers. */ + @SerializedName("line_item_references") + List lineItemReferences; - /** Routing requested priority. */ - @SerializedName("requested_priority") - RequestedPriority requestedPriority; + /** The address of the selling or delivering merchant. */ + @SerializedName("marketplace_seller_address") + MarketplaceSellerAddress marketplaceSellerAddress; - private Routing(Map extraParams, RequestedPriority requestedPriority) { - this.extraParams = extraParams; - this.requestedPriority = requestedPriority; - } + /** The name of the marketplace seller. */ + @SerializedName("marketplace_seller_name") + Object marketplaceSellerName; - public static Builder builder() { - return new Builder(); - } + /** The unique identifier for the marketplace seller. */ + @SerializedName("marketplace_seller_reference") + Object marketplaceSellerReference; - public static class Builder { - private Map extraParams; + /** The number of transactions the sub-seller completed in the last 12 months. */ + @SerializedName("number_of_transactions") + Long numberOfTransactions; - private RequestedPriority requestedPriority; + /** The category of the product. */ + @SerializedName("product_category") + ProductCategory productCategory; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing( - this.extraParams, this.requestedPriority); - } + /** The date when the seller's account with the marketplace was last logged in. */ + @SerializedName("seller_last_login_at") + Long sellerLastLoginAt; /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for the - * field documentation. + * The current rating of the marketplace seller. If the marketplace uses numeric ranking, + * map these to the enum values. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("seller_rating") + SellerRating sellerRating; + + /** The date when the seller's account with the marketplace was created. */ + @SerializedName("seller_registered_at") + Long sellerRegisteredAt; + + /** The date when the seller's account with the marketplace was last updated. */ + @SerializedName("seller_updated_at") + Long sellerUpdatedAt; /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing#extraParams} for the - * field documentation. + * The references to shipping addresses for purchases with multiple associated + * sub-sellers. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; + @SerializedName("shipping_references") + List shippingReferences; + + /** + * The accumulated amount of sales transactions made by the sub-merchant or sub-seller + * within the past 12 months in the payment currency. These transactions are in minor + * currency units. + */ + @SerializedName("volume_of_transactions") + Long volumeOfTransactions; + + private MarketplaceSeller( + Map extraParams, + List lineItemReferences, + MarketplaceSellerAddress marketplaceSellerAddress, + Object marketplaceSellerName, + Object marketplaceSellerReference, + Long numberOfTransactions, + ProductCategory productCategory, + Long sellerLastLoginAt, + SellerRating sellerRating, + Long sellerRegisteredAt, + Long sellerUpdatedAt, + List shippingReferences, + Long volumeOfTransactions) { + this.extraParams = extraParams; + this.lineItemReferences = lineItemReferences; + this.marketplaceSellerAddress = marketplaceSellerAddress; + this.marketplaceSellerName = marketplaceSellerName; + this.marketplaceSellerReference = marketplaceSellerReference; + this.numberOfTransactions = numberOfTransactions; + this.productCategory = productCategory; + this.sellerLastLoginAt = sellerLastLoginAt; + this.sellerRating = sellerRating; + this.sellerRegisteredAt = sellerRegisteredAt; + this.sellerUpdatedAt = sellerUpdatedAt; + this.shippingReferences = shippingReferences; + this.volumeOfTransactions = volumeOfTransactions; } - /** Routing requested priority. */ - public Builder setRequestedPriority( - PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.Routing.RequestedPriority - requestedPriority) { - this.requestedPriority = requestedPriority; - return this; + public static Builder builder() { + return new Builder(); } - } - public enum RequestedPriority implements ApiRequestParams.EnumParam { - @SerializedName("domestic") - DOMESTIC("domestic"), + public static class Builder { + private Map extraParams; - @SerializedName("international") - INTERNATIONAL("international"); + private List lineItemReferences; - @Getter(onMethod_ = {@Override}) - private final String value; + private MarketplaceSellerAddress marketplaceSellerAddress; - RequestedPriority(String value) { - this.value = value; - } - } - } + private Object marketplaceSellerName; - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"), + private Object marketplaceSellerReference; - @SerializedName("manual_preferred") - MANUAL_PREFERRED("manual_preferred"); + private Long numberOfTransactions; - @Getter(onMethod_ = {@Override}) - private final String value; + private ProductCategory productCategory; - CaptureMethod(String value) { - this.value = value; - } - } - } + private Long sellerLastLoginAt; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Cashapp { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + private SellerRating sellerRating; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Long sellerRegisteredAt; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + private Long sellerUpdatedAt; - private Cashapp( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private List shippingReferences; - public static Builder builder() { - return new Builder(); - } + private Long volumeOfTransactions; - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller( + this.extraParams, + this.lineItemReferences, + this.marketplaceSellerAddress, + this.marketplaceSellerName, + this.marketplaceSellerReference, + this.numberOfTransactions, + this.productCategory, + this.sellerLastLoginAt, + this.sellerRating, + this.sellerRegisteredAt, + this.sellerUpdatedAt, + this.shippingReferences, + this.volumeOfTransactions); + } - private Map extraParams; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private ApiRequestParams.EnumParam setupFutureUsage; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `lineItemReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addLineItemReference(String element) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.add(element); + return this; + } + + /** + * Add all elements to `lineItemReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#lineItemReferences} + * for the field documentation. + */ + public Builder addAllLineItemReference(List elements) { + if (this.lineItemReferences == null) { + this.lineItemReferences = new ArrayList<>(); + } + this.lineItemReferences.addAll(elements); + return this; + } + + /** The address of the selling or delivering merchant. */ + public Builder setMarketplaceSellerAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.MarketplaceSellerAddress + marketplaceSellerAddress) { + this.marketplaceSellerAddress = marketplaceSellerAddress; + return this; + } + + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(String marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } + + /** The name of the marketplace seller. */ + public Builder setMarketplaceSellerName(EmptyParam marketplaceSellerName) { + this.marketplaceSellerName = marketplaceSellerName; + return this; + } + + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(String marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } + + /** The unique identifier for the marketplace seller. */ + public Builder setMarketplaceSellerReference(EmptyParam marketplaceSellerReference) { + this.marketplaceSellerReference = marketplaceSellerReference; + return this; + } + + /** The number of transactions the sub-seller completed in the last 12 months. */ + public Builder setNumberOfTransactions(Long numberOfTransactions) { + this.numberOfTransactions = numberOfTransactions; + return this; + } + + /** The category of the product. */ + public Builder setProductCategory( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.ProductCategory + productCategory) { + this.productCategory = productCategory; + return this; + } + + /** The date when the seller's account with the marketplace was last logged in. */ + public Builder setSellerLastLoginAt(Long sellerLastLoginAt) { + this.sellerLastLoginAt = sellerLastLoginAt; + return this; + } + + /** + * The current rating of the marketplace seller. If the marketplace uses numeric + * ranking, map these to the enum values. + */ + public Builder setSellerRating( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.SellerRating + sellerRating) { + this.sellerRating = sellerRating; + return this; + } + + /** The date when the seller's account with the marketplace was created. */ + public Builder setSellerRegisteredAt(Long sellerRegisteredAt) { + this.sellerRegisteredAt = sellerRegisteredAt; + return this; + } + + /** The date when the seller's account with the marketplace was last updated. */ + public Builder setSellerUpdatedAt(Long sellerUpdatedAt) { + this.sellerUpdatedAt = sellerUpdatedAt; + return this; + } + + /** + * Add an element to `shippingReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addShippingReference(String element) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.add(element); + return this; + } + + /** + * Add all elements to `shippingReferences` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller#shippingReferences} + * for the field documentation. + */ + public Builder addAllShippingReference(List elements) { + if (this.shippingReferences == null) { + this.shippingReferences = new ArrayList<>(); + } + this.shippingReferences.addAll(elements); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + /** + * The accumulated amount of sales transactions made by the sub-merchant or sub-seller + * within the past 12 months in the payment currency. These transactions are in minor + * currency units. + */ + public Builder setVolumeOfTransactions(Long volumeOfTransactions) { + this.volumeOfTransactions = volumeOfTransactions; + return this; + } + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MarketplaceSellerAddress { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.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; - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.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; - } + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private MarketplaceSellerAddress( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Cashapp.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + public static class Builder { + private Object city; - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + private Object country; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - CaptureMethod(String value) { - this.value = value; - } - } + private Object postalCode; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + private Object region; - @SerializedName("off_session") - OFF_SESSION("off_session"), + private Object streetAddress; - @SerializedName("on_session") - ON_SESSION("on_session"); + private Object streetAddress2; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .MarketplaceSeller.MarketplaceSellerAddress + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Crypto { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private Crypto(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - public static class Builder { - private Map extraParams; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.MarketplaceSeller.MarketplaceSellerAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - private SetupFutureUsage setupFutureUsage; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Crypto build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Crypto( - this.extraParams, this.setupFutureUsage); - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Crypto#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Crypto#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 state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Crypto.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CustomerBalance { - /** - * Configuration for the bank transfer funding type, if the {@code funding_type} is set to - * {@code bank_transfer}. - */ - @SerializedName("bank_transfer") - BankTransfer bankTransfer; + public enum ProductCategory implements ApiRequestParams.EnumParam { + @SerializedName("accessories") + ACCESSORIES("accessories"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("appliances") + APPLIANCES("appliances"), - /** - * The funding method type to be used when there are not enough funds in the customer balance. - * Permitted values include: {@code bank_transfer}. - */ - @SerializedName("funding_type") - FundingType fundingType; + @SerializedName("apps_and_games") + APPS_AND_GAMES("apps_and_games"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + @SerializedName("arts_crafts_and_sewing") + ARTS_CRAFTS_AND_SEWING("arts_crafts_and_sewing"), - private CustomerBalance( - BankTransfer bankTransfer, - Map extraParams, - FundingType fundingType, - SetupFutureUsage setupFutureUsage) { - this.bankTransfer = bankTransfer; - this.extraParams = extraParams; - this.fundingType = fundingType; - this.setupFutureUsage = setupFutureUsage; - } + @SerializedName("automotive") + AUTOMOTIVE("automotive"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("baby") + BABY("baby"), - public static class Builder { - private BankTransfer bankTransfer; + @SerializedName("baby_clothing") + BABY_CLOTHING("baby_clothing"), - private Map extraParams; + @SerializedName("bags_and_purses") + BAGS_AND_PURSES("bags_and_purses"), - private FundingType fundingType; + @SerializedName("beauty") + BEAUTY("beauty"), - private SetupFutureUsage setupFutureUsage; + @SerializedName("books") + BOOKS("books"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance( - this.bankTransfer, this.extraParams, this.fundingType, this.setupFutureUsage); - } + @SerializedName("cds_and_vinyl") + CDS_AND_VINYL("cds_and_vinyl"), - /** - * Configuration for the bank transfer funding type, if the {@code funding_type} is set to - * {@code bank_transfer}. - */ - public Builder setBankTransfer( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - bankTransfer) { - this.bankTransfer = bankTransfer; - return this; - } + @SerializedName("cell_phones_and_accessories") + CELL_PHONES_AND_ACCESSORIES("cell_phones_and_accessories"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.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; - } + @SerializedName("collectibles_and_fine_arts") + COLLECTIBLES_AND_FINE_ARTS("collectibles_and_fine_arts"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.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; - } + @SerializedName("digital_music") + DIGITAL_MUSIC("digital_music"), - /** - * The funding method type to be used when there are not enough funds in the customer - * balance. Permitted values include: {@code bank_transfer}. - */ - public Builder setFundingType( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.FundingType - fundingType) { - this.fundingType = fundingType; - return this; - } + @SerializedName("electronics") + ELECTRONICS("electronics"), - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + @SerializedName("grocery_and_gourmet_food") + GROCERY_AND_GOURMET_FOOD("grocery_and_gourmet_food"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BankTransfer { - /** Configuration for the eu_bank_transfer funding type. */ - @SerializedName("eu_bank_transfer") - EuBankTransfer euBankTransfer; + @SerializedName("handmade") + HANDMADE("handmade"), - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("health_and_personal_care") + HEALTH_AND_PERSONAL_CARE("health_and_personal_care"), - /** - * List of address types that should be returned in the financial_addresses response. If not - * specified, all valid types will be returned. - * - *

Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code - * spei}. - */ - @SerializedName("requested_address_types") - List< - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes; + @SerializedName("home_and_kitchen") + HOME_AND_KITCHEN("home_and_kitchen"), - /** - * Required. The list of bank transfer types that this PaymentIntent is - * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code - * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code - * us_bank_transfer}. - */ - @SerializedName("type") - Type type; + @SerializedName("industrial_and_scientific") + INDUSTRIAL_AND_SCIENTIFIC("industrial_and_scientific"), - private BankTransfer( - EuBankTransfer euBankTransfer, - Map extraParams, - List< - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes, - Type type) { - this.euBankTransfer = euBankTransfer; - this.extraParams = extraParams; - this.requestedAddressTypes = requestedAddressTypes; - this.type = type; - } + @SerializedName("luggage_and_travel_gear") + LUGGAGE_AND_TRAVEL_GEAR("luggage_and_travel_gear"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("magazine_subscriptions") + MAGAZINE_SUBSCRIPTIONS("magazine_subscriptions"), - public static class Builder { - private EuBankTransfer euBankTransfer; + @SerializedName("men_clothing") + MEN_CLOTHING("men_clothing"), - private Map extraParams; + @SerializedName("musical_instruments") + MUSICAL_INSTRUMENTS("musical_instruments"), - private List< - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - requestedAddressTypes; + @SerializedName("office_products") + OFFICE_PRODUCTS("office_products"), - private Type type; + @SerializedName("patio_lawn_and_garden") + PATIO_LAWN_AND_GARDEN("patio_lawn_and_garden"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer( - this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); - } + @SerializedName("pet_supplies") + PET_SUPPLIES("pet_supplies"), - /** Configuration for the eu_bank_transfer funding type. */ - public Builder setEuBankTransfer( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer - euBankTransfer) { - this.euBankTransfer = euBankTransfer; - return this; - } + @SerializedName("shoes") + SHOES("shoes"), - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + @SerializedName("software") + SOFTWARE("software"), - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("sports_and_outdoors") + SPORTS_AND_OUTDOORS("sports_and_outdoors"), - /** - * Add an element to `requestedAddressTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} - * for the field documentation. - */ - public Builder addRequestedAddressType( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType - element) { - if (this.requestedAddressTypes == null) { - this.requestedAddressTypes = new ArrayList<>(); - } - this.requestedAddressTypes.add(element); - return this; - } + @SerializedName("tools_and_home_improvement") + TOOLS_AND_HOME_IMPROVEMENT("tools_and_home_improvement"), - /** - * Add all elements to `requestedAddressTypes` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer#requestedAddressTypes} - * for the field documentation. - */ - public Builder addAllRequestedAddressType( - List< - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .RequestedAddressType> - elements) { - if (this.requestedAddressTypes == null) { - this.requestedAddressTypes = new ArrayList<>(); + @SerializedName("toys_and_games") + TOYS_AND_GAMES("toys_and_games"), + + @SerializedName("video_games") + VIDEO_GAMES("video_games"), + + @SerializedName("women_clothing") + WOMEN_CLOTHING("women_clothing"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductCategory(String value) { + this.value = value; } - this.requestedAddressTypes.addAll(elements); - return this; } - /** - * Required. The list of bank transfer types that this PaymentIntent is - * allowed to use for funding Permitted values include: {@code eu_bank_transfer}, {@code - * gb_bank_transfer}, {@code jp_bank_transfer}, {@code mx_bank_transfer}, or {@code - * us_bank_transfer}. - */ - public Builder setType( - PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.Type - type) { - this.type = type; - return this; + public enum SellerRating implements ApiRequestParams.EnumParam { + @SerializedName("high") + HIGH("high"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("medium") + MEDIUM("medium"), + + @SerializedName("very_high") + VERY_HIGH("very_high"), + + @SerializedName("very_low") + VERY_LOW("very_low"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SellerRating(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class EuBankTransfer { - /** - * Required. The desired country code of the bank account information. - * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, - * or {@code NL}. - */ - @SerializedName("country") - Object country; + public static class RoundTripReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Currency. */ + @SerializedName("currency") + Object currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; /** * Map of extra parameters for custom features not available in this client library. The @@ -22233,9 +35693,55 @@ public static class EuBankTransfer { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private EuBankTransfer(Object country, Map extraParams) { - this.country = country; + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private RoundTripReservationDetail( + Object affiliateName, + Arrival arrival, + Object carrierName, + Object currency, + Departure departure, + Map extraParams, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + insurances, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } public static Builder builder() { @@ -22243,2045 +35749,2323 @@ public static Builder builder() { } public static class Builder { - private Object country; + private Object affiliateName; + + private Arrival arrival; + + private Object carrierName; + + private Object currency; + + private Departure departure; private Map extraParams; + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance> + insurances; + + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger> + passengers; + + private Long price; + + private TicketClass ticketClass; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer - .EuBankTransfer(this.country, this.extraParams); + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); } - /** - * Required. The desired country code of the bank account information. - * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, - * or {@code NL}. - */ - public Builder setCountry(String country) { - this.country = country; + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + return this; + } + + /** Arrival details. */ + public Builder setArrival( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } + + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** Departure details. */ + public Builder setDeparture( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure + departure) { + this.departure = departure; return this; } /** - * Required. The desired country code of the bank account information. - * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, - * or {@code NL}. + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} + * for the field documentation. */ - public Builder setCountry(EmptyParam country) { - this.country = country; + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); return this; } /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } + + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} * for the field documentation. */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addPassenger( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger + element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); } - this.extraParams.put(key, value); + this.passengers.add(element); return this; } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the - * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams} + * 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail#passengers} * for the field documentation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder addAllPassenger( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); } - this.extraParams.putAll(map); + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; return this; } } - } - public enum RequestedAddressType implements ApiRequestParams.EnumParam { - @SerializedName("aba") - ABA("aba"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - @SerializedName("iban") - IBAN("iban"), + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; - @SerializedName("sepa") - SEPA("sepa"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("sort_code") - SORT_CODE("sort_code"), + private Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } - @SerializedName("spei") - SPEI("spei"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("swift") - SWIFT("swift"), + public static class Builder { + private Address address; - @SerializedName("zengin") - ZENGIN("zengin"); + private Object arrivalLocation; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - RequestedAddressType(String value) { - this.value = value; - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("eu_bank_transfer") - EU_BANK_TRANSFER("eu_bank_transfer"), + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } - @SerializedName("gb_bank_transfer") - GB_BANK_TRANSFER("gb_bank_transfer"), + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - @SerializedName("jp_bank_transfer") - JP_BANK_TRANSFER("jp_bank_transfer"), + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - @SerializedName("mx_bank_transfer") - MX_BANK_TRANSFER("mx_bank_transfer"), + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @SerializedName("us_bank_transfer") - US_BANK_TRANSFER("us_bank_transfer"); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival#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(onMethod_ = {@Override}) - private final String value; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - Type(String value) { - this.value = value; - } - } - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - public enum FundingType implements ApiRequestParams.EnumParam { - @SerializedName("bank_transfer") - BANK_TRANSFER("bank_transfer"); + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static Builder builder() { + return new Builder(); + } - FundingType(String value) { - this.value = value; - } - } + public static class Builder { + private Object city; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private Object country; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Object postalCode; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class 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; + private Object region; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + private Object streetAddress; - private Eps(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Object streetAddress2; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - public static class Builder { - private Map extraParams; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Eps build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Eps( - this.extraParams, this.setupFutureUsage); - } + /** The country in ISO 3166-1 alpha-2 format. */ + 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 PaymentIntentUpdateParams.PaymentMethodOptions.Eps#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.Address#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Arrival.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; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.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; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; + + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; + + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Eps.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private Long departsAt; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + private Object departureLocation; - @Getter(onMethod_ = {@Override}) - private final String value; + private Map extraParams; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Fpx { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 of the departure location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Departure.Address + address) { + this.address = address; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - private Fpx(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + return this; + } - public static class Builder { - private Map extraParams; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private SetupFutureUsage setupFutureUsage; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Fpx build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Fpx( - this.extraParams, this.setupFutureUsage); - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Fpx#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Fpx#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-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 postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Fpx.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + public static Builder builder() { + return new Builder(); + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + public static class Builder { + private Object city; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object country; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Map extraParams; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Giropay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Object postalCode; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + private Object region; + + private Object streetAddress; + + private Object streetAddress2; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } + + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private Giropay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - public static class Builder { - private Map extraParams; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - private SetupFutureUsage setupFutureUsage; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Giropay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Giropay( - this.extraParams, this.setupFutureUsage); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Departure.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; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Giropay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Giropay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Giropay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Gopay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - private Gopay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; - public static Builder builder() { - return new Builder(); - } + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - public static class Builder { - private Map extraParams; + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; + } - private SetupFutureUsage setupFutureUsage; + public static Builder builder() { + return new Builder(); + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Gopay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Gopay( - this.extraParams, this.setupFutureUsage); - } + public static class Builder { + private Object currency; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Gopay#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Map extraParams; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Gopay#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private Object insuranceCompanyName; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Gopay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private InsuranceType insuranceType; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + private Long price; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } + + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Grabpay { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), - private Grabpay(Map extraParams, SetupFutureUsage setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("cancelation") + CANCELATION("cancelation"), - public static class Builder { - private Map extraParams; + @SerializedName("emergency") + EMERGENCY("emergency"), - private SetupFutureUsage setupFutureUsage; + @SerializedName("medical") + MEDICAL("medical"); - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay( - this.extraParams, this.setupFutureUsage); - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + InsuranceType(String value) { + this.value = value; + } + } } - this.extraParams.put(key, value); - return this; - } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Grabpay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; - @Getter(onMethod_ = {@Override}) - private final String value; + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + public static Builder builder() { + return new Builder(); + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class IdBankTransfer { - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 - * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - */ - @SerializedName("expires_after") - Long expiresAfter; + public static class Builder { + private Map extraParams; - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * now until 30 days from now. If unset, it defaults to 1 days from now. - */ - @SerializedName("expires_at") - Long expiresAt; + private Object familyName; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Object givenName; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .RoundTripReservationDetail.Passenger + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.RoundTripReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - private IdBankTransfer( - Long expiresAfter, - Long expiresAt, - Map extraParams, - SetupFutureUsage setupFutureUsage) { - this.expiresAfter = expiresAfter; - this.expiresAt = expiresAt; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.RoundTripReservationDetail.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; + } + + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } - public static class Builder { - private Long expiresAfter; + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } - private Long expiresAt; + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + } + } - private Map extraParams; + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - private SetupFutureUsage setupFutureUsage; + @SerializedName("economy") + ECONOMY("economy"), - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer( - this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); - } + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - */ - public Builder setExpiresAfter(Long expiresAfter) { - this.expiresAfter = expiresAfter; - return this; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from - * now until 30 days from now. If unset, it defaults to 1 days from now. - */ - public Builder setExpiresAt(Long expiresAt) { - this.expiresAt = expiresAt; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + TicketClass(String value) { + this.value = value; + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TrainReservationDetail { + /** Name of associated or partner company for the service. */ + @SerializedName("affiliate_name") + Object affiliateName; + + /** Arrival details. */ + @SerializedName("arrival") + Arrival arrival; + + /** Name of transportation company. */ + @SerializedName("carrier_name") + Object carrierName; + + /** Currency. */ + @SerializedName("currency") + Object currency; + + /** Departure details. */ + @SerializedName("departure") + Departure departure; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** List of insurances for this reservation. */ + @SerializedName("insurances") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance> + insurances; + + /** List of passengers that this reservation applies to. */ + @SerializedName("passengers") + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger> + passengers; + + /** Price in cents. */ + @SerializedName("price") + Long price; + + /** Ticket class. */ + @SerializedName("ticket_class") + TicketClass ticketClass; + + private TrainReservationDetail( + Object affiliateName, + Arrival arrival, + Object carrierName, + Object currency, + Departure departure, + Map extraParams, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + insurances, + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + passengers, + Long price, + TicketClass ticketClass) { + this.affiliateName = affiliateName; + this.arrival = arrival; + this.carrierName = carrierName; + this.currency = currency; + this.departure = departure; + this.extraParams = extraParams; + this.insurances = insurances; + this.passengers = passengers; + this.price = price; + this.ticketClass = ticketClass; } - this.extraParams.putAll(map); - return this; - } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + public static Builder builder() { + return new Builder(); + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + public static class Builder { + private Object affiliateName; - @Getter(onMethod_ = {@Override}) - private final String value; + private Arrival arrival; - SetupFutureUsage(String value) { - this.value = value; - } - } - } + private Object carrierName; - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Ideal { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + private Object currency; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a - * publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + private Departure departure; - private Ideal(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Map extraParams; - public static Builder builder() { - return new Builder(); - } + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance> + insurances; - public static class Builder { - private Map extraParams; + private List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger> + passengers; - private ApiRequestParams.EnumParam setupFutureUsage; + private Long price; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Ideal build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Ideal( - this.extraParams, this.setupFutureUsage); - } + private TicketClass ticketClass; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Ideal#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail( + this.affiliateName, + this.arrival, + this.carrierName, + this.currency, + this.departure, + this.extraParams, + this.insurances, + this.passengers, + this.price, + this.ticketClass); + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Ideal#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Ideal.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** Name of associated or partner company for the service. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; + 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; - } - } + /** Arrival details. */ + public Builder setArrival( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival + arrival) { + this.arrival = arrival; + return this; + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Name of transportation company. */ + public Builder setCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** Name of transportation company. */ + public Builder setCarrierName(EmptyParam carrierName) { + this.carrierName = carrierName; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** Currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class InteracPresent { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Departure details. */ + public Builder setDeparture( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure + departure) { + this.departure = departure; + return this; + } - private InteracPresent(Map extraParams) { - this.extraParams = extraParams; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - public static Builder builder() { - return new Builder(); - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - public static class Builder { - private Map extraParams; + /** + * Add an element to `insurances` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addInsurance( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance + element) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.add(element); + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent( - this.extraParams); - } + /** + * Add all elements to `insurances` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#insurances} + * for the field documentation. + */ + public Builder addAllInsurance( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance> + elements) { + if (this.insurances == null) { + this.insurances = new ArrayList<>(); + } + this.insurances.addAll(elements); + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + /** + * 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addPassenger( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger + element) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.add(element); + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail#passengers} + * for the field documentation. + */ + public Builder addAllPassenger( + List< + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger> + elements) { + if (this.passengers == null) { + this.passengers = new ArrayList<>(); + } + this.passengers.addAll(elements); + return this; + } + + /** Price in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + + /** Ticket class. */ + public Builder setTicketClass( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.TicketClass + ticketClass) { + this.ticketClass = ticketClass; + return this; + } } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class KakaoPay { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Arrival { + /** Address of the arrival location. */ + @SerializedName("address") + Address address; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** Identifier name or reference for the arrival location. */ + @SerializedName("arrival_location") + Object arrivalLocation; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply - * with regional legislation and network rules, such as SCA. - */ - @SerializedName("setup_future_usage") - ApiRequestParams.EnumParam setupFutureUsage; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 KakaoPay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.setupFutureUsage = setupFutureUsage; - } + private Arrival( + Address address, Object arrivalLocation, Map extraParams) { + this.address = address; + this.arrivalLocation = arrivalLocation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Object arrivalLocation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival( + this.address, this.arrivalLocation, this.extraParams); + } + + /** Address of the arrival location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Arrival.Address + address) { + this.address = address; + return this; + } + + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(String arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Identifier name or reference for the arrival location. */ + public Builder setArrivalLocation(EmptyParam arrivalLocation) { + this.arrivalLocation = arrivalLocation; + return this; + } - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - private Map extraParams; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } - private ApiRequestParams.EnumParam setupFutureUsage; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } + /** The country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + public static class Builder { + private Object city; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private Object country; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + private Map extraParams; - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you - * comply with regional legislation and network rules, such as SCA. - */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } - } + private Object postalCode; - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + private Object region; - @Getter(onMethod_ = {@Override}) - private final String value; + private Object streetAddress; - CaptureMethod(String value) { - this.value = value; - } - } + private Object streetAddress2; - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Arrival.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - @SerializedName("off_session") - OFF_SESSION("off_session"); + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - SetupFutureUsage(String value) { - this.value = value; - } - } - } + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Klarna { - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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; + } - /** On-demand details if setting up or charging an on-demand payment. */ - @SerializedName("on_demand") - OnDemand onDemand; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Arrival.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; + } - /** Preferred language of the Klarna authorization page that the customer is redirected to. */ - @SerializedName("preferred_locale") - PreferredLocale preferredLocale; + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + 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}. - */ - @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - /** Subscription details if setting up or charging a subscription. */ - @SerializedName("subscriptions") - Object subscriptions; + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } - private Klarna( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - OnDemand onDemand, - PreferredLocale preferredLocale, - SetupFutureUsage setupFutureUsage, - Object subscriptions) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - this.onDemand = onDemand; - this.preferredLocale = preferredLocale; - this.setupFutureUsage = setupFutureUsage; - this.subscriptions = subscriptions; - } + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } - public static Builder builder() { - return new Builder(); - } + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } - public static class Builder { - private ApiRequestParams.EnumParam captureMethod; + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } + } + } - private Map extraParams; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Departure { + /** Address of the departure location. */ + @SerializedName("address") + Address address; - private OnDemand onDemand; + /** Timestamp of departure. */ + @SerializedName("departs_at") + Long departsAt; - private PreferredLocale preferredLocale; + /** Identifier name or reference for the origin location. */ + @SerializedName("departure_location") + Object departureLocation; - private SetupFutureUsage setupFutureUsage; + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 Object subscriptions; + private Departure( + Address address, + Long departsAt, + Object departureLocation, + Map extraParams) { + this.address = address; + this.departsAt = departsAt; + this.departureLocation = departureLocation; + this.extraParams = extraParams; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna( - this.captureMethod, - this.extraParams, - this.onDemand, - this.preferredLocale, - this.setupFutureUsage, - this.subscriptions); - } + public static Builder builder() { + return new Builder(); + } - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } + public static class Builder { + private Address address; - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; - } + private Long departsAt; - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } + private Object departureLocation; - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + private Map extraParams; - /** On-demand details if setting up or charging an on-demand payment. */ - public Builder setOnDemand( - PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { - this.onDemand = onDemand; - return this; - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure( + this.address, this.departsAt, this.departureLocation, this.extraParams); + } - /** - * Preferred language of the Klarna authorization page that the customer is redirected to. - */ - public Builder setPreferredLocale( - PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.PreferredLocale preferredLocale) { - this.preferredLocale = preferredLocale; - return this; - } + /** Address of the departure location. */ + public Builder setAddress( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Departure.Address + address) { + this.address = address; + return this; + } - /** - * Indicates that you intend to make future payments with this PaymentIntent's payment - * method. - * - *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using - * a publishable key, you can only update the value from {@code on_session} to {@code - * off_session}. - */ - public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + /** Timestamp of departure. */ + public Builder setDepartsAt(Long departsAt) { + this.departsAt = departsAt; + return this; + } - /** - * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#subscriptions} for the field - * documentation. - */ - @SuppressWarnings("unchecked") - public Builder addSubscription( - PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription element) { - if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { - this.subscriptions = - new ArrayList(); - } - ((List) - this.subscriptions) - .add(element); - return this; - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(String departureLocation) { + this.departureLocation = departureLocation; + return this; + } - /** - * Add all elements to `subscriptions` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. - * See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#subscriptions} for the - * field documentation. - */ - @SuppressWarnings("unchecked") - public Builder addAllSubscription( - List elements) { - if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { - this.subscriptions = - new ArrayList(); - } - ((List) - this.subscriptions) - .addAll(elements); - return this; - } + /** Identifier name or reference for the origin location. */ + public Builder setDepartureLocation(EmptyParam departureLocation) { + this.departureLocation = departureLocation; + return this; + } - /** Subscription details if setting up or charging a subscription. */ - public Builder setSubscriptions(EmptyParam subscriptions) { - this.subscriptions = subscriptions; - return this; - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** Subscription details if setting up or charging a subscription. */ - public Builder setSubscriptions( - List - subscriptions) { - this.subscriptions = subscriptions; - return this; - } - } + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure#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 - @EqualsAndHashCode(callSuper = false) - public static class OnDemand { - /** - * Your average amount value. You can use a value across your customer base, or segment - * based on customer type, country, etc. - */ - @SerializedName("average_amount") - Long averageAmount; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** The city or town. */ + @SerializedName("city") + Object city; - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 country in ISO 3166-1 alpha-2 format. */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level field (serialized) name in this param object. Effectively, this + * map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code formatted according to country. */ + @SerializedName("postal_code") + Object postalCode; + + /** The state, county, province, or region formatted according to country. */ + @SerializedName("region") + Object region; + + /** Line 1 of the street address. */ + @SerializedName("street_address") + Object streetAddress; + + /** Line 2 of the street address. */ + @SerializedName("street_address2") + Object streetAddress2; + + private Address( + Object city, + Object country, + Map extraParams, + Object postalCode, + Object region, + Object streetAddress, + Object streetAddress2) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.postalCode = postalCode; + this.region = region; + this.streetAddress = streetAddress; + this.streetAddress2 = streetAddress2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; - /** - * The maximum value you may charge a customer per purchase. You can use a value across your - * customer base, or segment based on customer type, country, etc. - */ - @SerializedName("maximum_amount") - Long maximumAmount; + private Map extraParams; - /** - * The lowest or minimum value you may charge a customer per purchase. You can use a value - * across your customer base, or segment based on customer type, country, etc. - */ - @SerializedName("minimum_amount") - Long minimumAmount; + private Object postalCode; - /** Interval at which the customer is making purchases. */ - @SerializedName("purchase_interval") - PurchaseInterval purchaseInterval; + private Object region; - /** The number of {@code purchase_interval} between charges. */ - @SerializedName("purchase_interval_count") - Long purchaseIntervalCount; + private Object streetAddress; - private OnDemand( - Long averageAmount, - Map extraParams, - Long maximumAmount, - Long minimumAmount, - PurchaseInterval purchaseInterval, - Long purchaseIntervalCount) { - this.averageAmount = averageAmount; - this.extraParams = extraParams; - this.maximumAmount = maximumAmount; - this.minimumAmount = minimumAmount; - this.purchaseInterval = purchaseInterval; - this.purchaseIntervalCount = purchaseIntervalCount; - } + private Object streetAddress2; - public static Builder builder() { - return new Builder(); - } + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Departure.Address( + this.city, + this.country, + this.extraParams, + this.postalCode, + this.region, + this.streetAddress, + this.streetAddress2); + } - public static class Builder { - private Long averageAmount; + /** The city or town. */ + public Builder setCity(String city) { + this.city = city; + return this; + } - private Map extraParams; + /** The city or town. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } - private Long maximumAmount; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(String country) { + this.country = country; + return this; + } - private Long minimumAmount; + /** The country in ISO 3166-1 alpha-2 format. */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } - private PurchaseInterval purchaseInterval; + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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; + } - private Long purchaseIntervalCount; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Departure.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; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand( - this.averageAmount, - this.extraParams, - this.maximumAmount, - this.minimumAmount, - this.purchaseInterval, - this.purchaseIntervalCount); - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Your average amount value. You can use a value across your customer base, or segment - * based on customer type, country, etc. - */ - public Builder setAverageAmount(Long averageAmount) { - this.averageAmount = averageAmount; - return this; - } + /** The postal code formatted according to country. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(String region) { + this.region = region; + return this; + } + + /** The state, county, province, or region formatted according to country. */ + public Builder setRegion(EmptyParam region) { + this.region = region; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(String streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 1 of the street address. */ + public Builder setStreetAddress(EmptyParam streetAddress) { + this.streetAddress = streetAddress; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(String streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + + /** Line 2 of the street address. */ + public Builder setStreetAddress2(EmptyParam streetAddress2) { + this.streetAddress2 = streetAddress2; + return this; + } + } } - this.extraParams.put(key, value); - return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Insurance { + /** Insurance currency. */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Name of the company providing the insurance. */ + @SerializedName("insurance_company_name") + Object insuranceCompanyName; + + /** Type of insurance. */ + @SerializedName("insurance_type") + InsuranceType insuranceType; + + /** Price of insurance in cents. */ + @SerializedName("price") + Long price; + + private Insurance( + Object currency, + Map extraParams, + Object insuranceCompanyName, + InsuranceType insuranceType, + Long price) { + this.currency = currency; + this.extraParams = extraParams; + this.insuranceCompanyName = insuranceCompanyName; + this.insuranceType = insuranceType; + this.price = price; } - this.extraParams.putAll(map); - return this; - } - /** - * The maximum value you may charge a customer per purchase. You can use a value across - * your customer base, or segment based on customer type, country, etc. - */ - public Builder setMaximumAmount(Long maximumAmount) { - this.maximumAmount = maximumAmount; - return this; - } + public static Builder builder() { + return new Builder(); + } - /** - * The lowest or minimum value you may charge a customer per purchase. You can use a value - * across your customer base, or segment based on customer type, country, etc. - */ - public Builder setMinimumAmount(Long minimumAmount) { - this.minimumAmount = minimumAmount; - return this; - } + public static class Builder { + private Object currency; - /** Interval at which the customer is making purchases. */ - public Builder setPurchaseInterval( - PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval - purchaseInterval) { - this.purchaseInterval = purchaseInterval; - return this; - } + private Map extraParams; - /** The number of {@code purchase_interval} between charges. */ - public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { - this.purchaseIntervalCount = purchaseIntervalCount; - return this; - } - } + private Object insuranceCompanyName; - public enum PurchaseInterval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + private InsuranceType insuranceType; - @SerializedName("month") - MONTH("month"), + private Long price; - @SerializedName("week") - WEEK("week"), + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Insurance( + this.currency, + this.extraParams, + this.insuranceCompanyName, + this.insuranceType, + this.price); + } - @SerializedName("year") - YEAR("year"); + /** Insurance currency. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** Insurance currency. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } - PurchaseInterval(String value) { - this.value = value; - } - } - } + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Subscription { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field - * (serialized) name in this param object. Effectively, this map is flattened to its parent - * instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.Insurance#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. Unit of time between subscription charges. */ - @SerializedName("interval") - Interval interval; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(String insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } - /** - * The number of intervals (specified in the {@code interval} attribute) between - * subscription charges. For example, {@code interval=month} and {@code interval_count=3} - * charges every 3 months. - */ - @SerializedName("interval_count") - Long intervalCount; + /** Name of the company providing the insurance. */ + public Builder setInsuranceCompanyName(EmptyParam insuranceCompanyName) { + this.insuranceCompanyName = insuranceCompanyName; + return this; + } + + /** Type of insurance. */ + public Builder setInsuranceType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Insurance.InsuranceType + insuranceType) { + this.insuranceType = insuranceType; + return this; + } + + /** Price of insurance in cents. */ + public Builder setPrice(Long price) { + this.price = price; + return this; + } + } + + public enum InsuranceType implements ApiRequestParams.EnumParam { + @SerializedName("baggage") + BAGGAGE("baggage"), + + @SerializedName("bankruptcy") + BANKRUPTCY("bankruptcy"), + + @SerializedName("cancelation") + CANCELATION("cancelation"), + + @SerializedName("emergency") + EMERGENCY("emergency"), + + @SerializedName("medical") + MEDICAL("medical"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + InsuranceType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; - /** Name for subscription. */ - @SerializedName("name") - Object name; + /** The family name of the person. */ + @SerializedName("family_name") + Object familyName; - /** Describes the upcoming charge for this subscription. */ - @SerializedName("next_billing") - NextBilling nextBilling; + /** The given name of the person. */ + @SerializedName("given_name") + Object givenName; - /** - * Required. A non-customer-facing reference to correlate subscription - * charges in the Klarna app. Use a value that persists across subscription charges. - */ - @SerializedName("reference") - Object reference; + private Passenger( + Map extraParams, Object familyName, Object givenName) { + this.extraParams = extraParams; + this.familyName = familyName; + this.givenName = givenName; + } - private Subscription( - Map extraParams, - Interval interval, - Long intervalCount, - Object name, - NextBilling nextBilling, - Object reference) { - this.extraParams = extraParams; - this.interval = interval; - this.intervalCount = intervalCount; - this.name = name; - this.nextBilling = nextBilling; - this.reference = reference; - } + public static Builder builder() { + return new Builder(); + } - public static Builder builder() { - return new Builder(); - } + public static class Builder { + private Map extraParams; - public static class Builder { - private Map extraParams; + private Object familyName; - private Interval interval; + private Object givenName; - private Long intervalCount; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .TrainReservationDetail.Passenger + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.TrainReservationDetail.Passenger( + this.extraParams, this.familyName, this.givenName); + } - private Object 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 + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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; + } - private NextBilling nextBilling; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.TrainReservationDetail.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; + } - private Object reference; + /** The family name of the person. */ + public Builder setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription( - this.extraParams, - this.interval, - this.intervalCount, - this.name, - this.nextBilling, - this.reference); - } + /** The family name of the person. */ + public Builder setFamilyName(EmptyParam familyName) { + this.familyName = familyName; + return this; + } - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.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; - } + /** The given name of the person. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** The given name of the person. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } } - this.extraParams.putAll(map); - return this; - } - - /** Required. Unit of time between subscription charges. */ - public Builder setInterval( - PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.Interval - interval) { - this.interval = interval; - return this; } - /** - * The number of intervals (specified in the {@code interval} attribute) between - * subscription charges. For example, {@code interval=month} and {@code interval_count=3} - * charges every 3 months. - */ - public Builder setIntervalCount(Long intervalCount) { - this.intervalCount = intervalCount; - return this; - } + public enum TicketClass implements ApiRequestParams.EnumParam { + @SerializedName("business") + BUSINESS("business"), - /** Name for subscription. */ - public Builder setName(String name) { - this.name = name; - return this; - } + @SerializedName("economy") + ECONOMY("economy"), - /** Name for subscription. */ - public Builder setName(EmptyParam name) { - this.name = name; - return this; - } + @SerializedName("first_class") + FIRST_CLASS("first_class"), - /** Describes the upcoming charge for this subscription. */ - public Builder setNextBilling( - PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling - nextBilling) { - this.nextBilling = nextBilling; - return this; - } + @SerializedName("premium_economy") + PREMIUM_ECONOMY("premium_economy"); - /** - * Required. A non-customer-facing reference to correlate subscription - * charges in the Klarna app. Use a value that persists across subscription charges. - */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } + @Getter(onMethod_ = {@Override}) + private final String value; - /** - * Required. A non-customer-facing reference to correlate subscription - * charges in the Klarna app. Use a value that persists across subscription charges. - */ - public Builder setReference(EmptyParam reference) { - this.reference = reference; - return this; + TicketClass(String value) { + this.value = value; + } } } @Getter @EqualsAndHashCode(callSuper = false) - public static class NextBilling { - /** Required. The amount of the next charge for the subscription. */ - @SerializedName("amount") - Long amount; + public static class Voucher { + /** Name of associated or partner company for this voucher. */ + @SerializedName("affiliate_name") + Object affiliateName; - /** - * Required. The date of the next charge for the subscription in - * YYYY-MM-DD format. - */ - @SerializedName("date") - Object date; + /** The voucher validity end time. */ + @SerializedName("ends_at") + Long endsAt; /** * Map of extra parameters for custom features not available in this client library. The @@ -24293,10 +38077,37 @@ public static class NextBilling { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private NextBilling(Long amount, Object date, Map extraParams) { - this.amount = amount; - this.date = date; + /** The voucher validity start time. */ + @SerializedName("starts_at") + Long startsAt; + + /** The issuer or provider of this voucher. */ + @SerializedName("voucher_company") + Object voucherCompany; + + /** The name or reference to identify the voucher. */ + @SerializedName("voucher_name") + Object voucherName; + + /** The type of this voucher. */ + @SerializedName("voucher_type") + VoucherType voucherType; + + private Voucher( + Object affiliateName, + Long endsAt, + Map extraParams, + Long startsAt, + Object voucherCompany, + Object voucherName, + VoucherType voucherType) { + this.affiliateName = affiliateName; + this.endsAt = endsAt; this.extraParams = extraParams; + this.startsAt = startsAt; + this.voucherCompany = voucherCompany; + this.voucherName = voucherName; + this.voucherType = voucherType; } public static Builder builder() { @@ -24304,40 +38115,50 @@ public static Builder builder() { } public static class Builder { - private Long amount; + private Object affiliateName; - private Object date; + private Long endsAt; private Map extraParams; + private Long startsAt; + + private Object voucherCompany; + + private Object voucherName; + + private VoucherType voucherType; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription - .NextBilling(this.amount, this.date, this.extraParams); + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna + .SupplementaryPurchaseData.Voucher( + this.affiliateName, + this.endsAt, + this.extraParams, + this.startsAt, + this.voucherCompany, + this.voucherName, + this.voucherType); } - /** Required. The amount of the next charge for the subscription. */ - public Builder setAmount(Long amount) { - this.amount = amount; + /** Name of associated or partner company for this voucher. */ + public Builder setAffiliateName(String affiliateName) { + this.affiliateName = affiliateName; return this; } - /** - * Required. The date of the next charge for the subscription in - * YYYY-MM-DD format. - */ - public Builder setDate(String date) { - this.date = date; + /** Name of associated or partner company for this voucher. */ + public Builder setAffiliateName(EmptyParam affiliateName) { + this.affiliateName = affiliateName; return this; } - /** - * Required. The date of the next charge for the subscription in - * YYYY-MM-DD format. - */ - public Builder setDate(EmptyParam date) { - this.date = date; + /** The voucher validity end time. */ + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; return this; } @@ -24345,7 +38166,7 @@ public Builder setDate(EmptyParam date) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -24360,7 +38181,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData.Voucher#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -24370,27 +38191,69 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The voucher validity start time. */ + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; + return this; + } + + /** The issuer or provider of this voucher. */ + public Builder setVoucherCompany(String voucherCompany) { + this.voucherCompany = voucherCompany; + return this; + } + + /** The issuer or provider of this voucher. */ + public Builder setVoucherCompany(EmptyParam voucherCompany) { + this.voucherCompany = voucherCompany; + return this; + } + + /** The name or reference to identify the voucher. */ + public Builder setVoucherName(String voucherName) { + this.voucherName = voucherName; + return this; + } + + /** The name or reference to identify the voucher. */ + public Builder setVoucherName(EmptyParam voucherName) { + this.voucherName = voucherName; + return this; + } + + /** The type of this voucher. */ + public Builder setVoucherType( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.SupplementaryPurchaseData + .Voucher.VoucherType + voucherType) { + this.voucherType = voucherType; + return this; + } } - } - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), + public enum VoucherType implements ApiRequestParams.EnumParam { + @SerializedName("digital_product") + DIGITAL_PRODUCT("digital_product"), - @SerializedName("month") - MONTH("month"), + @SerializedName("discount") + DISCOUNT("discount"), - @SerializedName("week") - WEEK("week"), + @SerializedName("gift_card") + GIFT_CARD("gift_card"), - @SerializedName("year") - YEAR("year"); + @SerializedName("physical_product") + PHYSICAL_PRODUCT("physical_product"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("services") + SERVICES("services"); - Interval(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + VoucherType(String value) { + this.value = value; + } } } } diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index 6803165f83e..5fc891fdef3 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -13,10 +13,22 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentMethodListParams extends ApiRequestParams { + /** + * 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. + */ + @SerializedName("allow_redisplay") + AllowRedisplay allowRedisplay; + /** The ID of the customer whose PaymentMethods will be retrieved. */ @SerializedName("customer") String customer; + /** The ID of the Account whose PaymentMethods will be retrieved. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -64,14 +76,18 @@ public class PaymentMethodListParams extends ApiRequestParams { Type type; private PaymentMethodListParams( + AllowRedisplay allowRedisplay, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter, Type type) { + this.allowRedisplay = allowRedisplay; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -85,8 +101,12 @@ public static Builder builder() { } public static class Builder { + private AllowRedisplay allowRedisplay; + private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -102,7 +122,9 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentMethodListParams build() { return new PaymentMethodListParams( + this.allowRedisplay, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -111,12 +133,28 @@ public PaymentMethodListParams build() { this.type); } + /** + * 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. + */ + public Builder setAllowRedisplay(PaymentMethodListParams.AllowRedisplay allowRedisplay) { + this.allowRedisplay = allowRedisplay; + return this; + } + /** The ID of the customer whose PaymentMethods will be retrieved. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of the Account whose PaymentMethods will be retrieved. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -211,6 +249,24 @@ public Builder setType(PaymentMethodListParams.Type type) { } } + public enum AllowRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowRedisplay(String value) { + this.value = value; + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index e8832785c89..7fa9aa99962 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -707,6 +707,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("capital.financing_offer.accepted") CAPITAL__FINANCING_OFFER__ACCEPTED("capital.financing_offer.accepted"), + @SerializedName("capital.financing_offer.accepted_other_offer") + CAPITAL__FINANCING_OFFER__ACCEPTED_OTHER_OFFER("capital.financing_offer.accepted_other_offer"), + @SerializedName("capital.financing_offer.canceled") CAPITAL__FINANCING_OFFER__CANCELED("capital.financing_offer.canceled"), @@ -909,6 +912,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("file.created") FILE__CREATED("file.created"), + @SerializedName("financial_connections.account.account_numbers_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__ACCOUNT_NUMBERS_UPDATED( + "financial_connections.account.account_numbers_updated"), + @SerializedName("financial_connections.account.created") FINANCIAL_CONNECTIONS__ACCOUNT__CREATED("financial_connections.account.created"), @@ -937,6 +944,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { FINANCIAL_CONNECTIONS__ACCOUNT__REFRESHED_TRANSACTIONS( "financial_connections.account.refreshed_transactions"), + @SerializedName("financial_connections.account.upcoming_account_number_expiry") + FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_ACCOUNT_NUMBER_EXPIRY( + "financial_connections.account.upcoming_account_number_expiry"), + @SerializedName("financial_connections.session.updated") FINANCIAL_CONNECTIONS__SESSION__UPDATED("financial_connections.session.updated"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index fa48c29f9ac..1d27cf566ad 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -323,6 +323,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("capital.financing_offer.accepted") CAPITAL__FINANCING_OFFER__ACCEPTED("capital.financing_offer.accepted"), + @SerializedName("capital.financing_offer.accepted_other_offer") + CAPITAL__FINANCING_OFFER__ACCEPTED_OTHER_OFFER("capital.financing_offer.accepted_other_offer"), + @SerializedName("capital.financing_offer.canceled") CAPITAL__FINANCING_OFFER__CANCELED("capital.financing_offer.canceled"), @@ -525,6 +528,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("file.created") FILE__CREATED("file.created"), + @SerializedName("financial_connections.account.account_numbers_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__ACCOUNT_NUMBERS_UPDATED( + "financial_connections.account.account_numbers_updated"), + @SerializedName("financial_connections.account.created") FINANCIAL_CONNECTIONS__ACCOUNT__CREATED("financial_connections.account.created"), @@ -553,6 +560,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { FINANCIAL_CONNECTIONS__ACCOUNT__REFRESHED_TRANSACTIONS( "financial_connections.account.refreshed_transactions"), + @SerializedName("financial_connections.account.upcoming_account_number_expiry") + FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_ACCOUNT_NUMBER_EXPIRY( + "financial_connections.account.upcoming_account_number_expiry"), + @SerializedName("financial_connections.session.updated") FINANCIAL_CONNECTIONS__SESSION__UPDATED("financial_connections.session.updated"), diff --git a/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java b/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java index 3bae6bd8753..02852ac82e1 100644 --- a/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java @@ -238,11 +238,12 @@ public Builder setValueGroupingWindow( @EqualsAndHashCode(callSuper = false) public static class Meter { /** - * Key-value pairs used to filter usage events by meter dimension values. If specified, usage - * will be filtered for matching usage events. + * Key-value pairs used to filter usage events by meter dimension values. Each value is an array + * that can include multiple values for the key. If specified, usage is filtered for matching + * usage events. */ @SerializedName("dimension_filters") - Map dimensionFilters; + Map> dimensionFilters; /** * List of meter dimension keys to group by. If specified, usage events will be grouped by the @@ -265,18 +266,19 @@ public static class Meter { String meter; /** - * Key-value pairs used to filter usage events by high cardinality tenant dimension values. If - * specified, usage will be filtered for matching usage events. + * Key-value pairs used to filter usage events by high cardinality tenant dimension values. Each + * value is an array that can include multiple values for the key. If specified, usage is + * filtered for matching usage events. */ @SerializedName("tenant_filters") - Map tenantFilters; + Map> tenantFilters; private Meter( - Map dimensionFilters, + Map> dimensionFilters, List dimensionGroupByKeys, Map extraParams, String meter, - Map tenantFilters) { + Map> tenantFilters) { this.dimensionFilters = dimensionFilters; this.dimensionGroupByKeys = dimensionGroupByKeys; this.extraParams = extraParams; @@ -289,7 +291,7 @@ public static Builder builder() { } public static class Builder { - private Map dimensionFilters; + private Map> dimensionFilters; private List dimensionGroupByKeys; @@ -297,7 +299,7 @@ public static class Builder { private String meter; - private Map tenantFilters; + private Map> tenantFilters; /** Finalize and obtain parameter instance from this builder. */ public MeterUsageRetrieveParams.Meter build() { @@ -314,7 +316,7 @@ public MeterUsageRetrieveParams.Meter build() { * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link MeterUsageRetrieveParams.Meter#dimensionFilters} for the field documentation. */ - public Builder putDimensionFilter(String key, String value) { + public Builder putDimensionFilter(String key, List value) { if (this.dimensionFilters == null) { this.dimensionFilters = new HashMap<>(); } @@ -327,7 +329,7 @@ public Builder putDimensionFilter(String key, String value) { * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link MeterUsageRetrieveParams.Meter#dimensionFilters} for the field documentation. */ - public Builder putAllDimensionFilter(Map map) { + public Builder putAllDimensionFilter(Map> map) { if (this.dimensionFilters == null) { this.dimensionFilters = new HashMap<>(); } @@ -398,7 +400,7 @@ public Builder setMeter(String meter) { * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link MeterUsageRetrieveParams.Meter#tenantFilters} for the field documentation. */ - public Builder putTenantFilter(String key, String value) { + public Builder putTenantFilter(String key, List value) { if (this.tenantFilters == null) { this.tenantFilters = new HashMap<>(); } @@ -411,7 +413,7 @@ public Builder putTenantFilter(String key, String value) { * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link MeterUsageRetrieveParams.Meter#tenantFilters} for the field documentation. */ - public Builder putAllTenantFilter(Map map) { + public Builder putAllTenantFilter(Map> map) { if (this.tenantFilters == null) { this.tenantFilters = new HashMap<>(); } diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java index 88ea2baed99..38a837693dc 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java @@ -2612,6 +2612,10 @@ public static class RiskAssessment { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Stripe’s assessment of this authorization’s likelihood to be fraudulent. */ + @SerializedName("fraud_risk") + FraudRisk fraudRisk; + /** * The dispute risk of the merchant (the seller on a purchase) on an authorization based on all * Stripe Issuing activity. @@ -2622,9 +2626,11 @@ public static class RiskAssessment { private RiskAssessment( CardTestingRisk cardTestingRisk, Map extraParams, + FraudRisk fraudRisk, MerchantDisputeRisk merchantDisputeRisk) { this.cardTestingRisk = cardTestingRisk; this.extraParams = extraParams; + this.fraudRisk = fraudRisk; this.merchantDisputeRisk = merchantDisputeRisk; } @@ -2637,12 +2643,14 @@ public static class Builder { private Map extraParams; + private FraudRisk fraudRisk; + private MerchantDisputeRisk merchantDisputeRisk; /** Finalize and obtain parameter instance from this builder. */ public AuthorizationCreateParams.RiskAssessment build() { return new AuthorizationCreateParams.RiskAssessment( - this.cardTestingRisk, this.extraParams, this.merchantDisputeRisk); + this.cardTestingRisk, this.extraParams, this.fraudRisk, this.merchantDisputeRisk); } /** Stripe's assessment of this authorization's likelihood of being card testing activity. */ @@ -2679,6 +2687,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Stripe’s assessment of this authorization’s likelihood to be fraudulent. */ + public Builder setFraudRisk(AuthorizationCreateParams.RiskAssessment.FraudRisk fraudRisk) { + this.fraudRisk = fraudRisk; + return this; + } + /** * The dispute risk of the merchant (the seller on a purchase) on an authorization based on * all Stripe Issuing activity. @@ -2851,6 +2865,132 @@ public enum RiskLevel implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FraudRisk { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Stripe’s assessment of the likelihood of fraud on an + * authorization. + */ + @SerializedName("level") + Level level; + + /** + * Stripe’s numerical model score assessing the likelihood of fraudulent activity. A higher + * score means a higher likelihood of fraudulent activity, and anything above 25 is considered + * high risk. + */ + @SerializedName("score") + BigDecimal score; + + private FraudRisk(Map extraParams, Level level, BigDecimal score) { + this.extraParams = extraParams; + this.level = level; + this.score = score; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Level level; + + private BigDecimal score; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.FraudRisk build() { + return new AuthorizationCreateParams.RiskAssessment.FraudRisk( + this.extraParams, this.level, this.score); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.FraudRisk#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.FraudRisk#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. Stripe’s assessment of the likelihood of fraud on an + * authorization. + */ + public Builder setLevel(AuthorizationCreateParams.RiskAssessment.FraudRisk.Level level) { + this.level = level; + return this; + } + + /** + * Stripe’s numerical model score assessing the likelihood of fraudulent activity. A higher + * score means a higher likelihood of fraudulent activity, and anything above 25 is + * considered high risk. + */ + public Builder setScore(BigDecimal score) { + this.score = score; + return this; + } + } + + public enum Level implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Level(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class MerchantDisputeRisk { diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index 52cfac9b0c1..3a272c23e08 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -15785,9 +15785,10 @@ public static class LocalAmusementTax { * Required. A FIPS code * representing the local jurisdiction. Supported FIPS codes are: {@code 14000} (Chicago), - * {@code 06613} (Bloomington), {@code 21696} (East Dundee), {@code 24582} (Evanston), - * {@code 45421} (Lynwood), {@code 48892} (Midlothian), {@code 64343} (River Grove), and - * {@code 68081} (Schiller Park). + * {@code 02154} (Arlington Heights), {@code 06613} (Bloomington), {@code 10906} (Campton + * Hills), {@code 21696} (East Dundee), {@code 24582} (Evanston), {@code 45421} (Lynwood), + * {@code 48892} (Midlothian), {@code 64343} (River Grove), and {@code 68081} (Schiller + * Park). */ @SerializedName("jurisdiction") String jurisdiction; @@ -15846,9 +15847,10 @@ public Builder putAllExtraParam(Map map) { * Required. A FIPS code * representing the local jurisdiction. Supported FIPS codes are: {@code 14000} (Chicago), - * {@code 06613} (Bloomington), {@code 21696} (East Dundee), {@code 24582} (Evanston), - * {@code 45421} (Lynwood), {@code 48892} (Midlothian), {@code 64343} (River Grove), and - * {@code 68081} (Schiller Park). + * {@code 02154} (Arlington Heights), {@code 06613} (Bloomington), {@code 10906} (Campton + * Hills), {@code 21696} (East Dundee), {@code 24582} (Evanston), {@code 45421} (Lynwood), + * {@code 48892} (Midlothian), {@code 64343} (River Grove), and {@code 68081} (Schiller + * Park). */ public Builder setJurisdiction(String jurisdiction) { this.jurisdiction = jurisdiction; From 6f25215c80efb6a4ec6e3b40528af90bffae3b39 Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:19:52 -0800 Subject: [PATCH 10/17] Add min version for custom request support (#2109) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8ba0ebf84f3..32d60c2826d 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,8 @@ Stripe has features in the [private preview phase](https://docs.stripe.com/relea ### Custom requests +> This feature is only available from version 27 of this SDK. + If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `rawRequest` method on `StripeClient`. ```java From 0adfe4432c87bba562d8523a45ff7600fa5a4a43 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 01:47:08 +0000 Subject: [PATCH 11/17] Update generated code for v2117 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Charge.java | 12 +++---- .../com/stripe/model/ConfirmationToken.java | 13 ++++---- .../stripe/model/PaymentAttemptRecord.java | 12 +++---- .../java/com/stripe/model/PaymentMethod.java | 12 +++---- .../java/com/stripe/model/PaymentRecord.java | 12 +++---- .../java/com/stripe/model/SetupAttempt.java | 12 +++---- .../java/com/stripe/model/issuing/Card.java | 32 +++++++++++++++++++ .../param/ConfirmationTokenCreateParams.java | 3 ++ .../param/PaymentIntentConfirmParams.java | 3 ++ .../param/PaymentIntentCreateParams.java | 3 ++ .../param/PaymentIntentUpdateParams.java | 3 ++ .../param/PaymentMethodCreateParams.java | 3 ++ .../param/SetupIntentConfirmParams.java | 3 ++ .../stripe/param/SetupIntentCreateParams.java | 3 ++ .../stripe/param/SetupIntentUpdateParams.java | 3 ++ 17 files changed, 95 insertions(+), 38 deletions(-) diff --git a/API_VERSION b/API_VERSION index dce12afcdc8..50609624505 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -48d8ed18eca11eedce6fd54cd57fb83080d75acb \ No newline at end of file +441c0fcde75bcbf836f1a1810d5b9cfe8e8a7da4 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7aa7a83ad66..85592454d18 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2115 \ No newline at end of file +v2117 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index da962686ef9..12cf0c4c295 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2954,9 +2954,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2965,9 +2965,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 70001e3d6a6..69a59d2b5ed 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -1728,9 +1728,10 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, - * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code - * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, + * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code + * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code + * yoursafe}. */ @SerializedName("bank") String bank; @@ -1739,9 +1740,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank, if the bank was provided. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index d774b741b88..8560e43ab63 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -1871,9 +1871,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1882,9 +1882,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index bc7dbcfbb56..e17348bf350 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -2007,9 +2007,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, - * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code - * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code + * moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, + * {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2018,9 +2018,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank, if the bank was provided. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index daacf99eec0..e40284f02b6 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -2165,9 +2165,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2176,9 +2176,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 4d5581fc906..97839922f86 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -840,9 +840,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -851,9 +851,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index c2279b0a4a6..2c21195a2df 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -104,6 +104,13 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("last4") String last4; + /** + * Stripe’s assessment of whether this card’s details have been compromised. If this property + * isn't null, cancel and reissue the card to prevent fraudulent activity risk. + */ + @SerializedName("latest_fraud_warning") + LatestFraudWarning latestFraudWarning; + /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. @@ -412,6 +419,30 @@ public Card update(CardUpdateParams params, RequestOptions options) throws Strip return getResponseGetter().request(request, Card.class); } + /** + * For more details about LatestFraudWarning, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LatestFraudWarning extends StripeObject { + /** Timestamp of the most recent fraud warning. */ + @SerializedName("started_at") + Long startedAt; + + /** + * The type of fraud warning that most recently took place on this card. This field updates with + * every new fraud warning, so the value changes over time. If populated, cancel and reissue the + * card. + * + *

One of {@code card_testing_exposure}, {@code fraud_dispute_filed}, {@code + * third_party_reported}, or {@code user_indicated_fraud}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Shipping, please refer to the API * Reference. @@ -1041,6 +1072,7 @@ public Card submitCard(CardSubmitCardParams params, RequestOptions options) public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(cardholder, responseGetter); + trySetResponseGetter(latestFraudWarning, responseGetter); trySetResponseGetter(personalizationDesign, responseGetter); trySetResponseGetter(replacedBy, responseGetter); trySetResponseGetter(replacementFor, responseGetter); diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 97940730121..d0a29f7522c 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -3636,6 +3636,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 882b375457a..70885675b3b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -16635,6 +16635,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index fbe66e3ab87..e783429dd67 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -17119,6 +17119,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 134a0b441e3..e676b3c376c 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -17949,6 +17949,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index 903ff56de2a..b0d66c5cb36 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -3768,6 +3768,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 9ea6e2773ee..f5ea1e4fc42 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -4024,6 +4024,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index d8183e67cbf..81fc2922578 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -4559,6 +4559,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 3683869bfc3..667436d53f1 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -4027,6 +4027,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), From 4c2963ffcfb7daf5a2b387554891379aa4e6d80f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 17:50:57 +0000 Subject: [PATCH 12/17] Update generated code for v2121 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- ...tsOffSessionPaymentAttemptFailedEvent.java | 22 - ...PaymentAttemptFailedEventNotification.java | 28 - ...sOffSessionPaymentAttemptStartedEvent.java | 22 - ...aymentAttemptStartedEventNotification.java | 28 - ...aymentAuthorizationAttemptFailedEvent.java | 22 - ...izationAttemptFailedEventNotification.java | 29 - ...ymentAuthorizationAttemptStartedEvent.java | 22 - ...zationAttemptStartedEventNotification.java | 29 - ...aymentsOffSessionPaymentCanceledEvent.java | 22 - ...ssionPaymentCanceledEventNotification.java | 27 - ...PaymentsOffSessionPaymentCreatedEvent.java | 22 - ...essionPaymentCreatedEventNotification.java | 27 - ...2PaymentsOffSessionPaymentFailedEvent.java | 22 - ...SessionPaymentFailedEventNotification.java | 27 - ...OffSessionPaymentRequiresCaptureEvent.java | 22 - ...ymentRequiresCaptureEventNotification.java | 28 - ...ymentsOffSessionPaymentSucceededEvent.java | 22 - ...sionPaymentSucceededEventNotification.java | 27 - .../stripe/model/v2/EventDataClassLookup.java | 33 +- .../v2/EventNotificationClassLookup.java | 29 - .../com/stripe/model/v2/billing/Cadence.java | 8 +- .../model/v2/billing/CollectionSetting.java | 4 +- .../v2/billing/CollectionSettingVersion.java | 4 +- .../com/stripe/model/v2/core/Account.java | 405 +- .../stripe/model/v2/core/AccountPerson.java | 13 +- .../model/v2/core/AccountPersonToken.java | 55 + .../stripe/model/v2/core/AccountToken.java | 55 + .../java/com/stripe/model/v2/core/Event.java | 5 + .../v2/moneymanagement/FinancialAddress.java | 2 +- .../model/v2/payments/OffSessionPayment.java | 240 - .../CollectionSettingCreateParams.java | 12 +- .../CollectionSettingUpdateParams.java | 12 +- .../param/v2/core/AccountCreateParams.java | 33 +- .../param/v2/core/AccountRetrieveParams.java | 3 + .../v2/core/AccountTokenCreateParams.java | 7702 +++++++++++++++++ .../param/v2/core/AccountUpdateParams.java | 45 +- .../v2/core/accounts/PersonCreateParams.java | 18 + .../accounts/PersonTokenCreateParams.java | 3263 +++++++ .../v2/core/accounts/PersonUpdateParams.java | 24 + .../FinancialAddressCreateParams.java | 3 - .../OffSessionPaymentCaptureParams.java | 282 - .../OffSessionPaymentCreateParams.java | 882 -- .../payments/OffSessionPaymentListParams.java | 78 - .../java/com/stripe/service/V2Services.java | 4 - .../com/stripe/service/v2/CoreService.java | 4 + .../com/stripe/service/v2/PaymentService.java | 15 - .../service/v2/core/AccountService.java | 4 + .../service/v2/core/AccountTokenService.java | 48 + .../v2/core/accounts/PersonTokenService.java | 64 + .../v2/payments/OffSessionPaymentService.java | 111 - .../stripe/functional/GeneratedExamples.java | 650 +- 53 files changed, 12227 insertions(+), 2335 deletions(-) delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEventNotification.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEventNotification.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEventNotification.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentRequiresCaptureEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentRequiresCaptureEventNotification.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEvent.java delete mode 100644 src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEventNotification.java create mode 100644 src/main/java/com/stripe/model/v2/core/AccountPersonToken.java create mode 100644 src/main/java/com/stripe/model/v2/core/AccountToken.java delete mode 100644 src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java create mode 100644 src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java delete mode 100644 src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java delete mode 100644 src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java delete mode 100644 src/main/java/com/stripe/param/v2/payments/OffSessionPaymentListParams.java delete mode 100644 src/main/java/com/stripe/service/v2/PaymentService.java create mode 100644 src/main/java/com/stripe/service/v2/core/AccountTokenService.java create mode 100644 src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java delete mode 100644 src/main/java/com/stripe/service/v2/payments/OffSessionPaymentService.java diff --git a/API_VERSION b/API_VERSION index 50609624505..e0ecaaa28eb 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -441c0fcde75bcbf836f1a1810d5b9cfe8e8a7da4 \ No newline at end of file +f587035a62fe3323ed42077a0526158e57a8260b \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 85592454d18..559abffe4b5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2117 \ No newline at end of file +v2121 \ No newline at end of file diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java deleted file mode 100644 index aa8d7203b89..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentAttemptFailedEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.java deleted file mode 100644 index 8efcf8fda14..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEventNotification.java +++ /dev/null @@ -1,28 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentAttemptFailedEventNotification - extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentAttemptFailedEvent fetchEvent() throws StripeException { - return (V2PaymentsOffSessionPaymentAttemptFailedEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEvent.java deleted file mode 100644 index 9f52eb0c2d5..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentAttemptStartedEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.java deleted file mode 100644 index 69a46100690..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptStartedEventNotification.java +++ /dev/null @@ -1,28 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentAttemptStartedEventNotification - extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentAttemptStartedEvent fetchEvent() throws StripeException { - return (V2PaymentsOffSessionPaymentAttemptStartedEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.java deleted file mode 100644 index 58b0db22351..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.java deleted file mode 100644 index c7080c00584..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.java +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification - extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent fetchEvent() - throws StripeException { - return (V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.java deleted file mode 100644 index 5cc91e3a4c5..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.java deleted file mode 100644 index a26c2cfe202..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.java +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification - extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent fetchEvent() - throws StripeException { - return (V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEvent.java deleted file mode 100644 index 79feffb2de8..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentCanceledEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEventNotification.java deleted file mode 100644 index 108fa6fbd17..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEventNotification.java +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentCanceledEventNotification extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentCanceledEvent fetchEvent() throws StripeException { - return (V2PaymentsOffSessionPaymentCanceledEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEvent.java deleted file mode 100644 index ee422e1456e..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentCreatedEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEventNotification.java deleted file mode 100644 index 64213704d23..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEventNotification.java +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentCreatedEventNotification extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentCreatedEvent fetchEvent() throws StripeException { - return (V2PaymentsOffSessionPaymentCreatedEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java deleted file mode 100644 index b93ef0a59cf..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentFailedEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEventNotification.java deleted file mode 100644 index d331638b7e3..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEventNotification.java +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentFailedEventNotification extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentFailedEvent fetchEvent() throws StripeException { - return (V2PaymentsOffSessionPaymentFailedEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentRequiresCaptureEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentRequiresCaptureEvent.java deleted file mode 100644 index cb5fae2b71f..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentRequiresCaptureEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentRequiresCaptureEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentRequiresCaptureEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentRequiresCaptureEventNotification.java deleted file mode 100644 index 394ed17da57..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentRequiresCaptureEventNotification.java +++ /dev/null @@ -1,28 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentRequiresCaptureEventNotification - extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentRequiresCaptureEvent fetchEvent() throws StripeException { - return (V2PaymentsOffSessionPaymentRequiresCaptureEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEvent.java deleted file mode 100644 index 2fded91b3cc..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentSucceededEvent extends Event { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } -} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEventNotification.java deleted file mode 100644 index 4afe990dd3b..00000000000 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEventNotification.java +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.events; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.core.Event.RelatedObject; -import com.stripe.model.v2.core.EventNotification; -import com.stripe.model.v2.payments.OffSessionPayment; -import lombok.Getter; - -@Getter -public final class V2PaymentsOffSessionPaymentSucceededEventNotification extends EventNotification { - @SerializedName("related_object") - - /** Object containing the reference to API resource relevant to the event. */ - RelatedObject relatedObject; - - /** Retrieves the related object from the API. Make an API request on every call. */ - public OffSessionPayment fetchRelatedObject() throws StripeException { - return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); - } - /** Retrieve the corresponding full event from the Stripe API. */ - @Override - public V2PaymentsOffSessionPaymentSucceededEvent fetchEvent() throws StripeException { - return (V2PaymentsOffSessionPaymentSucceededEvent) super.fetchEvent(); - } -} diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 01b15a553a0..adb0680cdec 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -46,6 +46,9 @@ public final class EventDataClassLookup { classLookup.put("v2.core.account", com.stripe.model.v2.core.Account.class); classLookup.put("v2.core.account_link", com.stripe.model.v2.core.AccountLink.class); classLookup.put("v2.core.account_person", com.stripe.model.v2.core.AccountPerson.class); + classLookup.put( + "v2.core.account_person_token", com.stripe.model.v2.core.AccountPersonToken.class); + classLookup.put("v2.core.account_token", com.stripe.model.v2.core.AccountToken.class); classLookup.put("v2.core.event", com.stripe.model.v2.core.Event.class); classLookup.put("v2.core.event_destination", com.stripe.model.v2.core.EventDestination.class); @@ -95,9 +98,6 @@ public final class EventDataClassLookup { "v2.money_management.transaction_entry", com.stripe.model.v2.moneymanagement.TransactionEntry.class); - classLookup.put( - "v2.payments.off_session_payment", com.stripe.model.v2.payments.OffSessionPayment.class); - eventClassLookup.put( "v1.billing.meter.error_report_triggered", com.stripe.events.V1BillingMeterErrorReportTriggeredEvent.class); @@ -264,32 +264,5 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.money_management.transaction.updated", com.stripe.events.V2MoneyManagementTransactionUpdatedEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.attempt_failed", - com.stripe.events.V2PaymentsOffSessionPaymentAttemptFailedEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.attempt_started", - com.stripe.events.V2PaymentsOffSessionPaymentAttemptStartedEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.authorization_attempt_failed", - com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.authorization_attempt_started", - com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.canceled", - com.stripe.events.V2PaymentsOffSessionPaymentCanceledEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.created", - com.stripe.events.V2PaymentsOffSessionPaymentCreatedEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.failed", - com.stripe.events.V2PaymentsOffSessionPaymentFailedEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.requires_capture", - com.stripe.events.V2PaymentsOffSessionPaymentRequiresCaptureEvent.class); - eventClassLookup.put( - "v2.payments.off_session_payment.succeeded", - com.stripe.events.V2PaymentsOffSessionPaymentSucceededEvent.class); } } diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index ca93475a578..370db1c3f8d 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -197,34 +197,5 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.money_management.transaction.updated", com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification.class); - eventClassLookup.put( - "v2.payments.off_session_payment.attempt_failed", - com.stripe.events.V2PaymentsOffSessionPaymentAttemptFailedEventNotification.class); - eventClassLookup.put( - "v2.payments.off_session_payment.attempt_started", - com.stripe.events.V2PaymentsOffSessionPaymentAttemptStartedEventNotification.class); - eventClassLookup.put( - "v2.payments.off_session_payment.authorization_attempt_failed", - com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification - .class); - eventClassLookup.put( - "v2.payments.off_session_payment.authorization_attempt_started", - com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification - .class); - eventClassLookup.put( - "v2.payments.off_session_payment.canceled", - com.stripe.events.V2PaymentsOffSessionPaymentCanceledEventNotification.class); - eventClassLookup.put( - "v2.payments.off_session_payment.created", - com.stripe.events.V2PaymentsOffSessionPaymentCreatedEventNotification.class); - eventClassLookup.put( - "v2.payments.off_session_payment.failed", - com.stripe.events.V2PaymentsOffSessionPaymentFailedEventNotification.class); - eventClassLookup.put( - "v2.payments.off_session_payment.requires_capture", - com.stripe.events.V2PaymentsOffSessionPaymentRequiresCaptureEventNotification.class); - eventClassLookup.put( - "v2.payments.off_session_payment.succeeded", - com.stripe.events.V2PaymentsOffSessionPaymentSucceededEventNotification.class); } } diff --git a/src/main/java/com/stripe/model/v2/billing/Cadence.java b/src/main/java/com/stripe/model/v2/billing/Cadence.java index 206cc7eb82d..6f0c5bef4d8 100644 --- a/src/main/java/com/stripe/model/v2/billing/Cadence.java +++ b/src/main/java/com/stripe/model/v2/billing/Cadence.java @@ -638,10 +638,10 @@ public static class Card extends StripeObject { /** * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to * automatically prompt your customers for authentication based on risk level and other - * requirements. However, if you wish to request 3D Secure based on logic from your - * own fraud engine, provide this option. Read our guide on manually + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. Read our guide on manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. * diff --git a/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java b/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java index 5e699c71989..4a9be6c5836 100644 --- a/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java +++ b/src/main/java/com/stripe/model/v2/billing/CollectionSetting.java @@ -228,10 +228,10 @@ public static class Card extends StripeObject { /** * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to * automatically prompt your customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. * diff --git a/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java b/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java index 2b620865a26..8c511cc3c92 100644 --- a/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java +++ b/src/main/java/com/stripe/model/v2/billing/CollectionSettingVersion.java @@ -202,10 +202,10 @@ public static class Card extends StripeObject { /** * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to * automatically prompt your customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. * diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index 1fa796bb0b5..2f025657c53 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -73,6 +73,13 @@ public class Account extends StripeObject implements HasId { @SerializedName("display_name") String displayName; + /** + * Information about the future requirements for the Account that will eventually come into + * effect, including what information needs to be collected, and by when. + */ + @SerializedName("future_requirements") + FutureRequirements futureRequirements; + /** Unique identifier for the Account. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -106,8 +113,8 @@ public class Account extends StripeObject implements HasId { String object; /** - * Information about the requirements for the Account, including what information needs to be - * collected, and by when. + * Information about the active requirements for the Account, including what information needs to + * be collected, and by when. */ @SerializedName("requirements") Requirements requirements; @@ -211,16 +218,17 @@ public static class AutomaticIndirectTax extends StripeObject { String ipAddress; /** - * The customer’s identified tax location - uses {@code location_source}. Will only be - * rendered if the {@code automatic_indirect_tax} feature is requested and {@code active}. + * The identified + * tax location of the customer. Will only be rendered if the {@code automatic_indirect_tax} + * feature is requested and {@code active}. */ @SerializedName("location") Location location; /** - * The data source used to identify the customer's tax location - defaults to {@code - * identity_address}. Will only be used for automatic tax calculation on the customer's - * Invoices and Subscriptions. + * The data source used to identify the customer's tax location. Will only be used for + * automatic tax calculation on the customer's Invoices and Subscriptions. * *

One of {@code identity_address}, {@code ip_address}, {@code payment_method}, or {@code * shipping_address}. @@ -229,8 +237,10 @@ public static class AutomaticIndirectTax extends StripeObject { String locationSource; /** - * The customer’s identified tax location - uses {@code location_source}. Will only be - * rendered if the {@code automatic_indirect_tax} feature is requested and {@code active}. + * The identified + * tax location of the customer. Will only be rendered if the {@code automatic_indirect_tax} + * feature is requested and {@code active}. */ @Getter @Setter @@ -345,8 +355,7 @@ public static class Capabilities extends StripeObject { /** * Generates requirements for enabling automatic indirect tax calculation on this customer's * invoices or subscriptions. Recommended to request this capability if planning to enable - * automatic tax calculation on this customer's invoices or subscriptions. Uses the {@code - * location_source} field. + * automatic tax calculation on this customer's invoices or subscriptions. */ @SerializedName("automatic_indirect_tax") AutomaticIndirectTax automaticIndirectTax; @@ -354,8 +363,7 @@ public static class Capabilities extends StripeObject { /** * Generates requirements for enabling automatic indirect tax calculation on this customer's * invoices or subscriptions. Recommended to request this capability if planning to enable - * automatic tax calculation on this customer's invoices or subscriptions. Uses the {@code - * location_source} field. + * automatic tax calculation on this customer's invoices or subscriptions. */ @Getter @Setter @@ -4694,6 +4702,333 @@ public static class Responsibilities extends StripeObject { } } + /** + * Information about the future requirements for the Account that will eventually come into + * effect, including what information needs to be collected, and by when. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FutureRequirements extends StripeObject { + /** A list of requirements for the Account. */ + @SerializedName("entries") + List entries; + + /** The time at which the future requirements become effective. */ + @SerializedName("minimum_transition_date") + Instant minimumTransitionDate; + + /** An object containing an overview of requirements for the Account. */ + @SerializedName("summary") + Summary summary; + + /** + * For more details about Entry, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Entry extends StripeObject { + /** + * Whether the responsibility is with the integrator or with Stripe (to review info, to wait + * for some condition, etc.) to action the requirement. + * + *

One of {@code stripe}, or {@code user}. + */ + @SerializedName("awaiting_action_from") + String awaitingActionFrom; + + /** Machine-readable string describing the requirement. */ + @SerializedName("description") + String description; + + /** + * Descriptions of why the requirement must be collected, or why the collected information + * isn't satisfactory to Stripe. + */ + @SerializedName("errors") + List errors; + + /** + * A hash describing the impact of not collecting the requirement, or Stripe not being able to + * verify the collected information. + */ + @SerializedName("impact") + Impact impact; + + /** The soonest point when the account will be impacted by not providing the requirement. */ + @SerializedName("minimum_deadline") + MinimumDeadline minimumDeadline; + + /** A reference to the location of the requirement. */ + @SerializedName("reference") + Reference reference; + + /** A list of reasons why Stripe is collecting the requirement. */ + @SerializedName("requested_reasons") + List requestedReasons; + + /** + * For more details about Errors, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errors extends StripeObject { + /** + * Machine-readable code describing the error. + * + *

One of {@code invalid_address_city_state_postal_code}, {@code + * invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, {@code + * invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, {@code + * invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code + * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code + * invalid_product_description_length}, {@code invalid_product_description_url_match}, + * {@code invalid_representative_country}, {@code + * invalid_statement_descriptor_business_mismatch}, {@code + * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, + * {@code invalid_statement_descriptor_prefix_denylisted}, {@code + * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code + * invalid_tax_id}, {@code invalid_tax_id_format}, {@code invalid_tos_acceptance}, {@code + * invalid_url_denylisted}, {@code invalid_url_format}, {@code + * invalid_url_website_business_information_mismatch}, {@code invalid_url_website_empty}, + * {@code invalid_url_website_inaccessible}, {@code + * invalid_url_website_inaccessible_geoblocked}, {@code + * invalid_url_website_inaccessible_password_protected}, {@code + * invalid_url_website_incomplete}, {@code + * invalid_url_website_incomplete_cancellation_policy}, {@code + * invalid_url_website_incomplete_customer_service_details}, {@code + * invalid_url_website_incomplete_legal_restrictions}, {@code + * invalid_url_website_incomplete_refund_policy}, {@code + * invalid_url_website_incomplete_return_policy}, {@code + * invalid_url_website_incomplete_terms_and_conditions}, {@code + * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, + * {@code invalid_url_web_presence_detected}, {@code invalid_value_other}, {@code + * unresolvable_ip_address}, {@code unresolvable_postal_code}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, + * {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, + * {@code verification_document_failed_test_mode}, {@code verification_document_fraudulent}, + * {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, + * {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code + * verification_document_type_not_supported}, {@code verification_extraneous_directors}, + * {@code verification_failed_address_match}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, + * {@code verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, + * {@code verification_missing_executives}, {@code verification_missing_owners}, {@code + * verification_requires_additional_memorandum_of_associations}, {@code + * verification_requires_additional_proof_of_registration}, {@code + * verification_selfie_document_missing_photo}, {@code verification_selfie_face_mismatch}, + * {@code verification_selfie_manipulated}, {@code verification_selfie_unverified_other}, + * {@code verification_supportability}, or {@code verification_token_stale}. + */ + @SerializedName("code") + String code; + + /** Human-readable description of the error. */ + @SerializedName("description") + String description; + } + + /** + * A hash describing the impact of not collecting the requirement, or Stripe not being able to + * verify the collected information. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Impact extends StripeObject { + /** + * The Capabilities that will be restricted if the requirement is not collected and + * satisfactory to Stripe. + */ + @SerializedName("restricts_capabilities") + List restrictsCapabilities; + + /** + * For more details about RestrictsCapability, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RestrictsCapability extends StripeObject { + /** + * The name of the Capability which will be restricted. + * + *

One of {@code ach_debit_payments}, {@code acss_debit_payments}, {@code + * affirm_payments}, {@code afterpay_clearpay_payments}, {@code alma_payments}, {@code + * amazon_pay_payments}, {@code automatic_indirect_tax}, {@code au_becs_debit_payments}, + * {@code bacs_debit_payments}, {@code bancontact_payments}, {@code bank_accounts.local}, + * {@code bank_accounts.wire}, {@code blik_payments}, {@code boleto_payments}, {@code + * cards}, {@code card_payments}, {@code cartes_bancaires_payments}, {@code + * cashapp_payments}, {@code eps_payments}, {@code financial_addresses.bank_accounts}, + * {@code fpx_payments}, {@code gb_bank_transfer_payments}, {@code grabpay_payments}, + * {@code holds_currencies.eur}, {@code holds_currencies.gbp}, {@code + * holds_currencies.usd}, {@code ideal_payments}, {@code + * inbound_transfers.financial_accounts}, {@code jcb_payments}, {@code + * jp_bank_transfer_payments}, {@code kakao_pay_payments}, {@code klarna_payments}, {@code + * konbini_payments}, {@code kr_card_payments}, {@code link_payments}, {@code + * mobilepay_payments}, {@code multibanco_payments}, {@code mx_bank_transfer_payments}, + * {@code naver_pay_payments}, {@code outbound_payments.bank_accounts}, {@code + * outbound_payments.cards}, {@code outbound_payments.financial_accounts}, {@code + * outbound_transfers.bank_accounts}, {@code outbound_transfers.financial_accounts}, + * {@code oxxo_payments}, {@code p24_payments}, {@code payco_payments}, {@code + * paynow_payments}, {@code pay_by_bank_payments}, {@code promptpay_payments}, {@code + * revolut_pay_payments}, {@code samsung_pay_payments}, {@code + * sepa_bank_transfer_payments}, {@code sepa_debit_payments}, {@code + * stripe_balance.payouts}, {@code stripe_balance.stripe_transfers}, {@code + * swish_payments}, {@code twint_payments}, {@code us_bank_transfer_payments}, or {@code + * zip_payments}. + */ + @SerializedName("capability") + String capability; + + /** + * The configuration which specifies the Capability which will be restricted. + * + *

One of {@code customer}, {@code merchant}, {@code recipient}, or {@code storer}. + */ + @SerializedName("configuration") + String configuration; + + /** + * Details about when in the account lifecycle the requirement must be collected by the + * avoid the Capability restriction. + */ + @SerializedName("deadline") + Deadline deadline; + + /** + * Details about when in the account lifecycle the requirement must be collected by the + * avoid the Capability restriction. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Deadline extends StripeObject { + /** + * The current status of the requirement's impact. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + } + } + } + + /** The soonest point when the account will be impacted by not providing the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MinimumDeadline extends StripeObject { + /** + * The current status of the requirement's impact. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + } + + /** A reference to the location of the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Reference extends StripeObject { + /** If {@code inquiry} is the type, the inquiry token. */ + @SerializedName("inquiry") + String inquiry; + + /** If {@code resource} is the type, the resource token. */ + @SerializedName("resource") + String resource; + + /** + * The type of the reference. If the type is "inquiry", the inquiry token can be + * found in the "inquiry" field. Otherwise the type is an API resource, the token + * for which can be found in the "resource" field. + * + *

One of {@code inquiry}, {@code payment_method}, or {@code person}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about RequestedReason, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RequestedReason extends StripeObject { + /** + * Machine-readable description of Stripe's reason for collecting the requirement. + * + *

One of {@code routine_onboarding}, or {@code routine_verification}. + */ + @SerializedName("code") + String code; + } + } + + /** An object containing an overview of requirements for the Account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Summary extends StripeObject { + /** + * The soonest date and time a requirement on the Account will become {@code past due}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * {@code 2022-09-18T13:22:18.123Z}. + */ + @SerializedName("minimum_deadline") + MinimumDeadline minimumDeadline; + + /** + * The soonest date and time a requirement on the Account will become {@code past due}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * {@code 2022-09-18T13:22:18.123Z}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MinimumDeadline extends StripeObject { + /** + * The current strictest status of all requirements on the Account. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + + /** The soonest RFC3339 date & time UTC value a requirement can impact the Account. */ + @SerializedName("time") + Instant time; + } + } + } + /** Information about the company, individual, and business represented by the Account. */ @Getter @Setter @@ -5415,20 +5750,20 @@ public static class IdNumber extends StripeObject { /** * Open Enum. The ID number type of a business entity. * - *

One of {@code ae_crn}, {@code ae_vat}, {@code ao_nif}, {@code at_fn}, {@code au_abn}, - * {@code au_acn}, {@code au_in}, {@code az_tin}, {@code bd_etin}, {@code be_cbe}, {@code - * bg_uic}, {@code br_cnpj}, {@code ca_cn}, {@code ca_crarr}, {@code ca_neq}, {@code - * ca_rid}, {@code ch_chid}, {@code ch_uid}, {@code cr_cpj}, {@code cr_nite}, {@code - * cy_tic}, {@code cz_ico}, {@code de_hrn}, {@code de_vat}, {@code dk_cvr}, {@code do_rcn}, - * {@code ee_rk}, {@code es_cif}, {@code fi_yt}, {@code fr_siren}, {@code fr_vat}, {@code - * gb_crn}, {@code gi_crn}, {@code gr_gemi}, {@code gt_nit}, {@code hk_br}, {@code hk_cr}, - * {@code hk_mbs}, {@code hu_cjs}, {@code ie_crn}, {@code it_rea}, {@code it_vat}, {@code - * jp_cn}, {@code kz_bin}, {@code li_uid}, {@code lt_ccrn}, {@code lu_rcs}, {@code lv_urn}, - * {@code mt_crn}, {@code mx_rfc}, {@code my_brn}, {@code my_coid}, {@code my_sst}, {@code - * mz_nuit}, {@code nl_kvk}, {@code no_orgnr}, {@code nz_bn}, {@code pe_ruc}, {@code - * pk_ntn}, {@code pl_regon}, {@code pt_vat}, {@code ro_cui}, {@code sa_crn}, {@code - * sa_tin}, {@code se_orgnr}, {@code sg_uen}, {@code si_msp}, {@code sk_ico}, {@code - * th_crn}, {@code th_prn}, {@code th_tin}, or {@code us_ein}. + *

One of {@code ae_crn}, {@code ae_vat}, {@code ao_nif}, {@code ar_cuit}, {@code at_fn}, + * {@code au_abn}, {@code au_acn}, {@code au_in}, {@code az_tin}, {@code bd_etin}, {@code + * be_cbe}, {@code bg_uic}, {@code br_cnpj}, {@code ca_cn}, {@code ca_crarr}, {@code + * ca_neq}, {@code ca_rid}, {@code ch_chid}, {@code ch_uid}, {@code cr_cpj}, {@code + * cr_nite}, {@code cy_tic}, {@code cz_ico}, {@code de_hrn}, {@code de_vat}, {@code dk_cvr}, + * {@code do_rcn}, {@code ee_rk}, {@code es_cif}, {@code fi_yt}, {@code fr_siren}, {@code + * fr_vat}, {@code gb_crn}, {@code gi_crn}, {@code gr_gemi}, {@code gt_nit}, {@code hk_br}, + * {@code hk_cr}, {@code hk_mbs}, {@code hu_cjs}, {@code ie_crn}, {@code it_rea}, {@code + * it_vat}, {@code jp_cn}, {@code kz_bin}, {@code li_uid}, {@code lt_ccrn}, {@code lu_rcs}, + * {@code lv_urn}, {@code mt_crn}, {@code mx_rfc}, {@code my_brn}, {@code my_coid}, {@code + * my_sst}, {@code mz_nuit}, {@code nl_kvk}, {@code no_orgnr}, {@code nz_bn}, {@code + * pe_ruc}, {@code pk_ntn}, {@code pl_regon}, {@code pt_vat}, {@code ro_cui}, {@code + * sa_crn}, {@code sa_tin}, {@code se_orgnr}, {@code sg_uen}, {@code si_msp}, {@code + * sk_ico}, {@code th_crn}, {@code th_prn}, {@code th_tin}, or {@code us_ein}. */ @SerializedName("type") String type; @@ -6086,8 +6421,8 @@ public static class IdNumber extends StripeObject { /** * The ID number type of an individual. * - *

One of {@code ae_eid}, {@code ao_nif}, {@code az_tin}, {@code bd_brc}, {@code - * bd_etin}, {@code bd_nid}, {@code br_cpf}, {@code cr_cpf}, {@code cr_dimex}, {@code + *

One of {@code ae_eid}, {@code ao_nif}, {@code ar_dni}, {@code az_tin}, {@code bd_brc}, + * {@code bd_etin}, {@code bd_nid}, {@code br_cpf}, {@code cr_cpf}, {@code cr_dimex}, {@code * cr_nite}, {@code de_stn}, {@code do_rcn}, {@code gt_nit}, {@code hk_id}, {@code kz_iin}, * {@code mx_rfc}, {@code my_nric}, {@code mz_nuit}, {@code nl_bsn}, {@code pe_dni}, {@code * pk_cnic}, {@code pk_snic}, {@code sa_tin}, {@code sg_fin}, {@code sg_nric}, {@code @@ -6282,8 +6617,8 @@ public static class Kanji extends StripeObject { } /** - * Information about the requirements for the Account, including what information needs to be - * collected, and by when. + * Information about the active requirements for the Account, including what information needs to + * be collected, and by when. */ @Getter @Setter @@ -6457,8 +6792,9 @@ public static class RestrictsCapability extends StripeObject { * cards}, {@code card_payments}, {@code cartes_bancaires_payments}, {@code * cashapp_payments}, {@code eps_payments}, {@code financial_addresses.bank_accounts}, * {@code fpx_payments}, {@code gb_bank_transfer_payments}, {@code grabpay_payments}, - * {@code holds_currencies.gbp}, {@code holds_currencies.usd}, {@code ideal_payments}, - * {@code inbound_transfers.financial_accounts}, {@code jcb_payments}, {@code + * {@code holds_currencies.eur}, {@code holds_currencies.gbp}, {@code + * holds_currencies.usd}, {@code ideal_payments}, {@code + * inbound_transfers.financial_accounts}, {@code jcb_payments}, {@code * jp_bank_transfer_payments}, {@code kakao_pay_payments}, {@code klarna_payments}, {@code * konbini_payments}, {@code kr_card_payments}, {@code link_payments}, {@code * mobilepay_payments}, {@code multibanco_payments}, {@code mx_bank_transfer_payments}, @@ -6559,8 +6895,7 @@ public static class RequestedReason extends StripeObject { /** * Machine-readable description of Stripe's reason for collecting the requirement. * - *

One of {@code future_requirements}, {@code routine_onboarding}, or {@code - * routine_verification}. + *

One of {@code routine_onboarding}, or {@code routine_verification}. */ @SerializedName("code") String code; diff --git a/src/main/java/com/stripe/model/v2/core/AccountPerson.java b/src/main/java/com/stripe/model/v2/core/AccountPerson.java index 90183d36dc4..96dfa034726 100644 --- a/src/main/java/com/stripe/model/v2/core/AccountPerson.java +++ b/src/main/java/com/stripe/model/v2/core/AccountPerson.java @@ -526,12 +526,13 @@ public static class IdNumber extends StripeObject { /** * The ID number type of an individual. * - *

One of {@code ae_eid}, {@code ao_nif}, {@code az_tin}, {@code bd_brc}, {@code bd_etin}, - * {@code bd_nid}, {@code br_cpf}, {@code cr_cpf}, {@code cr_dimex}, {@code cr_nite}, {@code - * de_stn}, {@code do_rcn}, {@code gt_nit}, {@code hk_id}, {@code kz_iin}, {@code mx_rfc}, - * {@code my_nric}, {@code mz_nuit}, {@code nl_bsn}, {@code pe_dni}, {@code pk_cnic}, {@code - * pk_snic}, {@code sa_tin}, {@code sg_fin}, {@code sg_nric}, {@code th_lc}, {@code th_pin}, - * {@code us_itin}, {@code us_itin_last_4}, {@code us_ssn}, or {@code us_ssn_last_4}. + *

One of {@code ae_eid}, {@code ao_nif}, {@code ar_dni}, {@code az_tin}, {@code bd_brc}, + * {@code bd_etin}, {@code bd_nid}, {@code br_cpf}, {@code cr_cpf}, {@code cr_dimex}, {@code + * cr_nite}, {@code de_stn}, {@code do_rcn}, {@code gt_nit}, {@code hk_id}, {@code kz_iin}, + * {@code mx_rfc}, {@code my_nric}, {@code mz_nuit}, {@code nl_bsn}, {@code pe_dni}, {@code + * pk_cnic}, {@code pk_snic}, {@code sa_tin}, {@code sg_fin}, {@code sg_nric}, {@code th_lc}, + * {@code th_pin}, {@code us_itin}, {@code us_itin_last_4}, {@code us_ssn}, or {@code + * us_ssn_last_4}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/v2/core/AccountPersonToken.java b/src/main/java/com/stripe/model/v2/core/AccountPersonToken.java new file mode 100644 index 00000000000..4ef1f13f9cb --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/AccountPersonToken.java @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Person Tokens are single-use tokens which tokenize person information, and are used for creating + * or updating a Person. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class AccountPersonToken extends StripeObject implements HasId { + /** + * Time at which the token was created. Represented as a RFC 3339 date & time UTC value in + * millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** Time at which the token will expire. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** Unique identifier for the token. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the token exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.account_person_token}. + */ + @SerializedName("object") + String object; + + /** Determines if the token has already been used (tokens can only be used once). */ + @SerializedName("used") + Boolean used; +} diff --git a/src/main/java/com/stripe/model/v2/core/AccountToken.java b/src/main/java/com/stripe/model/v2/core/AccountToken.java new file mode 100644 index 00000000000..6bf4bb5c879 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/AccountToken.java @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Account tokens are single-use tokens which tokenize company/individual/business information, and + * are used for creating or updating an Account. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class AccountToken extends StripeObject implements HasId { + /** + * Time at which the token was created. Represented as a RFC 3339 date & time UTC value in + * millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** Time at which the token will expire. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** Unique identifier for the token. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the token exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.account_token}. + */ + @SerializedName("object") + String object; + + /** Determines if the token has already been used (tokens can only be used once). */ + @SerializedName("used") + Boolean used; +} diff --git a/src/main/java/com/stripe/model/v2/core/Event.java b/src/main/java/com/stripe/model/v2/core/Event.java index 0d0963ecdfc..1c9b0fed797 100644 --- a/src/main/java/com/stripe/model/v2/core/Event.java +++ b/src/main/java/com/stripe/model/v2/core/Event.java @@ -14,6 +14,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import java.time.Instant; +import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -34,6 +35,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Event extends StripeObject implements HasId, StripeActiveObject { + /** Before and after changes for the primary related object. */ + @SerializedName("changes") + Map changes; + /** Authentication context needed to fetch the event or related object. */ @SerializedName("context") String context; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java index a7b8fc6a1fc..ee321c66721 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java @@ -99,7 +99,7 @@ public static class Credentials extends StripeObject { /** * Open Enum. The type of Credentials that are provisioned for the FinancialAddress. * - *

One of {@code gb_bank_account}, {@code sepa_bank_account}, or {@code us_bank_account}. + *

One of {@code gb_bank_account}, or {@code us_bank_account}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java deleted file mode 100644 index 33421eaca2f..00000000000 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ /dev/null @@ -1,240 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.model.v2.payments; - -import com.google.gson.annotations.SerializedName; -import com.stripe.model.HasId; -import com.stripe.model.StripeObject; -import com.stripe.v2.Amount; -import java.time.Instant; -import java.util.Map; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; - -/** OffSessionPayment resource. */ -@Getter -@Setter -@EqualsAndHashCode(callSuper = false) -public class OffSessionPayment extends StripeObject implements HasId { - /** The amount available to be captured. */ - @SerializedName("amount_capturable") - Amount amountCapturable; - - /** The “presentment amount” to be collected from the customer. */ - @SerializedName("amount_requested") - Amount amountRequested; - - /** - * The frequency of the underlying payment. - * - *

One of {@code recurring}, or {@code unscheduled}. - */ - @SerializedName("cadence") - String cadence; - - /** Details about the capture configuration for the OffSessionPayment. */ - @SerializedName("capture") - Capture capture; - - /** ID of the owning compartment. */ - @SerializedName("compartment_id") - String compartmentId; - - /** - * Creation time of the OffSessionPayment. Represented as a RFC 3339 date & time UTC value in - * millisecond precision, for example: 2022-09-18T13:22:18.123Z. - */ - @SerializedName("created") - Instant created; - - /** ID of the Customer to which this OffSessionPayment belongs. */ - @SerializedName("customer") - String customer; - - /** - * The reason why the OffSessionPayment failed. - * - *

One of {@code authorization_expired}, {@code rejected_by_partner}, or {@code - * retries_exhausted}. - */ - @SerializedName("failure_reason") - String failureReason; - - /** Unique identifier for the object. */ - @Getter(onMethod_ = {@Override}) - @SerializedName("id") - String id; - - /** The payment error encountered in the previous attempt to authorize the payment. */ - @SerializedName("last_authorization_attempt_error") - String lastAuthorizationAttemptError; - - /** Payment attempt record for the latest attempt, if one exists. */ - @SerializedName("latest_payment_attempt_record") - String latestPaymentAttemptRecord; - - /** - * Has the value true if the object exists in live mode or the value false if the object exists in - * test mode. - */ - @SerializedName("livemode") - Boolean livemode; - - /** - * 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. Learn more about storing - * information in metadata. - */ - @SerializedName("metadata") - Map metadata; - - /** - * String representing the object's type. Objects of the same type share the same value of the - * object field. - * - *

Equal to {@code v2.payments.off_session_payment}. - */ - @SerializedName("object") - String object; - - /** The account (if any) for which the funds of the OffSessionPayment are intended. */ - @SerializedName("on_behalf_of") - String onBehalfOf; - - /** ID of the payment method used in this OffSessionPayment. */ - @SerializedName("payment_method") - String paymentMethod; - - /** Payment record associated with the OffSessionPayment. */ - @SerializedName("payment_record") - String paymentRecord; - - /** Details about the payments orchestration configuration. */ - @SerializedName("payments_orchestration") - PaymentsOrchestration paymentsOrchestration; - - /** Details about the OffSessionPayment retries. */ - @SerializedName("retry_details") - RetryDetails retryDetails; - - /** - * Text that appears on the customer’s statement as the statement descriptor for a non-card - * charge. This value overrides the account’s default statement descriptor. For information about - * requirements, including the 22-character limit, see the Statement Descriptor - * docs. - */ - @SerializedName("statement_descriptor") - String statementDescriptor; - - /** - * Provides information about a card charge. Concatenated to the account’s statement - * descriptor prefix to form the complete statement descriptor that appears on the customer’s - * statement. - */ - @SerializedName("statement_descriptor_suffix") - String statementDescriptorSuffix; - - /** - * Status of this OffSessionPayment, one of {@code pending}, {@code pending_retry}, {@code - * processing}, {@code failed}, {@code canceled}, {@code requires_capture}, or {@code succeeded}. - */ - @SerializedName("status") - String status; - - /** Test clock that can be used to advance the retry attempts in a sandbox. */ - @SerializedName("test_clock") - String testClock; - - /** - * The data that automatically creates a Transfer after the payment finalizes. Learn more about - * the use case for connected - * accounts. - */ - @SerializedName("transfer_data") - TransferData transferData; - - /** Details about the capture configuration for the OffSessionPayment. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Capture extends StripeObject { - /** The timestamp when this payment is no longer eligible to be captured. */ - @SerializedName("capture_before") - Instant captureBefore; - - /** - * The method to use to capture the payment. - * - *

One of {@code automatic}, or {@code manual}. - */ - @SerializedName("capture_method") - String captureMethod; - } - - /** Details about the payments orchestration configuration. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class PaymentsOrchestration extends StripeObject { - /** - * True when you want to enable payments orchestration for this off-session payment. False - * otherwise. - */ - @SerializedName("enabled") - Boolean enabled; - } - - /** Details about the OffSessionPayment retries. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class RetryDetails extends StripeObject { - /** Number of authorization attempts so far. */ - @SerializedName("attempts") - Long attempts; - - /** The pre-configured retry policy to use for the payment. */ - @SerializedName("retry_policy") - String retryPolicy; - - /** - * Indicates the strategy for how you want Stripe to retry the payment. - * - *

One of {@code heuristic}, {@code none}, {@code scheduled}, or {@code smart}. - */ - @SerializedName("retry_strategy") - String retryStrategy; - } - - /** - * The data that automatically creates a Transfer after the payment finalizes. Learn more about - * the use case for connected - * accounts. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class TransferData extends StripeObject { - /** - * The amount transferred to the destination account. This transfer will occur automatically - * after the payment succeeds. If no amount is specified, by default the entire payment amount - * is transferred to the destination account. The amount must be less than or equal to the amount_requested, - * and must be a positive integer representing how much to transfer in the smallest currency - * unit (e.g., 100 cents to charge $1.00). - */ - @SerializedName("amount") - Long amount; - - /** - * The account (if any) that the payment is attributed to for tax reporting, and where funds - * from the payment are transferred to after payment success. - */ - @SerializedName("destination") - String destination; - } -} diff --git a/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java b/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java index 216a38bbeb0..a4ae606600f 100644 --- a/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CollectionSettingCreateParams.java @@ -909,10 +909,10 @@ public static class Card { /** * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to * automatically prompt your customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -996,10 +996,10 @@ public Builder setNetwork(String network) { /** * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to * automatically prompt your customers for authentication based on risk level and other - * requirements. However, if you wish to request 3D Secure based on logic from your own - * fraud engine, provide this option. Read our guide on manually + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. Read our guide on manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ diff --git a/src/main/java/com/stripe/param/v2/billing/CollectionSettingUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/CollectionSettingUpdateParams.java index e5b51c5d994..b4eb433b47e 100644 --- a/src/main/java/com/stripe/param/v2/billing/CollectionSettingUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CollectionSettingUpdateParams.java @@ -972,10 +972,10 @@ public static class Card { /** * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to * automatically prompt your customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -1068,10 +1068,10 @@ public Builder setNetwork(EmptyParam network) { /** * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to * automatically prompt your customers for authentication based on risk level and other - * requirements. However, if you wish to request 3D Secure based on logic from your own - * fraud engine, provide this option. Read our guide on manually + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. + * However, if you wish to request 3D Secure based on logic from your own fraud engine, + * provide this option. Read our guide on manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index 7c0ba8c5dd4..2fe72e534ea 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -15,6 +15,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class AccountCreateParams extends ApiRequestParams { + /** The account token generated by the account token api. */ + @SerializedName("account_token") + String accountToken; + /** * An Account Configuration which allows the Account to take on a key persona across Stripe * products. @@ -72,6 +76,7 @@ public class AccountCreateParams extends ApiRequestParams { Map metadata; private AccountCreateParams( + String accountToken, Configuration configuration, String contactEmail, Dashboard dashboard, @@ -81,6 +86,7 @@ private AccountCreateParams( Identity identity, List include, Map metadata) { + this.accountToken = accountToken; this.configuration = configuration; this.contactEmail = contactEmail; this.dashboard = dashboard; @@ -97,6 +103,8 @@ public static Builder builder() { } public static class Builder { + private String accountToken; + private Configuration configuration; private String contactEmail; @@ -118,6 +126,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams build() { return new AccountCreateParams( + this.accountToken, this.configuration, this.contactEmail, this.dashboard, @@ -129,6 +138,12 @@ public AccountCreateParams build() { this.metadata); } + /** The account token generated by the account token api. */ + public Builder setAccountToken(String accountToken) { + this.accountToken = accountToken; + return this; + } + /** * An Account Configuration which allows the Account to take on a key persona across Stripe * products. @@ -569,7 +584,7 @@ public static class AutomaticIndirectTax { /** * The data source used to identify the customer's tax location - defaults to {@code * identity_address}. Will only be used for automatic tax calculation on the customer's - * Invoices and Subscriptions. + * Invoices and Subscriptions. This behavior is now deprecated for new users. */ @SerializedName("location_source") LocationSource locationSource; @@ -656,7 +671,7 @@ public Builder setIpAddress(String ipAddress) { /** * The data source used to identify the customer's tax location - defaults to {@code * identity_address}. Will only be used for automatic tax calculation on the customer's - * Invoices and Subscriptions. + * Invoices and Subscriptions. This behavior is now deprecated for new users. */ public Builder setLocationSource( AccountCreateParams.Configuration.Customer.AutomaticIndirectTax.LocationSource @@ -1185,8 +1200,7 @@ public static class Capabilities { /** * Generates requirements for enabling automatic indirect tax calculation on this customer's * invoices or subscriptions. Recommended to request this capability if planning to enable - * automatic tax calculation on this customer's invoices or subscriptions. Uses the {@code - * location_source} field. + * automatic tax calculation on this customer's invoices or subscriptions. */ @SerializedName("automatic_indirect_tax") AutomaticIndirectTax automaticIndirectTax; @@ -1226,7 +1240,7 @@ public AccountCreateParams.Configuration.Customer.Capabilities build() { * Generates requirements for enabling automatic indirect tax calculation on this * customer's invoices or subscriptions. Recommended to request this capability if * planning to enable automatic tax calculation on this customer's invoices or - * subscriptions. Uses the {@code location_source} field. + * subscriptions. */ public Builder setAutomaticIndirectTax( AccountCreateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax @@ -13981,6 +13995,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ao_nif") AO_NIF("ao_nif"), + @SerializedName("ar_cuit") + AR_CUIT("ar_cuit"), + @SerializedName("at_fn") AT_FN("at_fn"), @@ -17212,6 +17229,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ao_nif") AO_NIF("ao_nif"), + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + @SerializedName("az_tin") AZ_TIN("az_tin"), @@ -18243,6 +18263,9 @@ public enum Include implements ApiRequestParams.EnumParam { @SerializedName("defaults") DEFAULTS("defaults"), + @SerializedName("future_requirements") + FUTURE_REQUIREMENTS("future_requirements"), + @SerializedName("identity") IDENTITY("identity"), diff --git a/src/main/java/com/stripe/param/v2/core/AccountRetrieveParams.java b/src/main/java/com/stripe/param/v2/core/AccountRetrieveParams.java index dee37bdee38..7b347427293 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountRetrieveParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountRetrieveParams.java @@ -115,6 +115,9 @@ public enum Include implements ApiRequestParams.EnumParam { @SerializedName("defaults") DEFAULTS("defaults"), + @SerializedName("future_requirements") + FUTURE_REQUIREMENTS("future_requirements"), + @SerializedName("identity") IDENTITY("identity"), diff --git a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java new file mode 100644 index 00000000000..75bc358bc67 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -0,0 +1,7702 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import com.stripe.v2.Amount; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountTokenCreateParams extends ApiRequestParams { + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + @SerializedName("contact_email") + String contactEmail; + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + @SerializedName("display_name") + String displayName; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. Information about the company, individual, and business represented + * by the Account. + */ + @SerializedName("identity") + Identity identity; + + private AccountTokenCreateParams( + String contactEmail, String displayName, Map extraParams, Identity identity) { + this.contactEmail = contactEmail; + this.displayName = displayName; + this.extraParams = extraParams; + this.identity = identity; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String contactEmail; + + private String displayName; + + private Map extraParams; + + private Identity identity; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams build() { + return new AccountTokenCreateParams( + this.contactEmail, this.displayName, this.extraParams, this.identity); + } + + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + public Builder setContactEmail(String contactEmail) { + this.contactEmail = contactEmail; + return this; + } + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + 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 + * AccountTokenCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountTokenCreateParams#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. Information about the company, individual, and business + * represented by the Account. + */ + public Builder setIdentity(AccountTokenCreateParams.Identity identity) { + this.identity = identity; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Identity { + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + @SerializedName("attestations") + Attestations attestations; + + /** Information about the company or business. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** The entity type. */ + @SerializedName("entity_type") + EntityType entityType; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Information about the person represented by the account. */ + @SerializedName("individual") + Individual individual; + + private Identity( + Attestations attestations, + BusinessDetails businessDetails, + EntityType entityType, + Map extraParams, + Individual individual) { + this.attestations = attestations; + this.businessDetails = businessDetails; + this.entityType = entityType; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Attestations attestations; + + private BusinessDetails businessDetails; + + private EntityType entityType; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity build() { + return new AccountTokenCreateParams.Identity( + this.attestations, + this.businessDetails, + this.entityType, + this.extraParams, + this.individual); + } + + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + public Builder setAttestations(AccountTokenCreateParams.Identity.Attestations attestations) { + this.attestations = attestations; + return this; + } + + /** Information about the company or business. */ + public Builder setBusinessDetails( + AccountTokenCreateParams.Identity.BusinessDetails businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** The entity type. */ + public Builder setEntityType(AccountTokenCreateParams.Identity.EntityType entityType) { + this.entityType = entityType; + 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 + * AccountTokenCreateParams.Identity#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountTokenCreateParams.Identity#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Information about the person represented by the account. */ + public Builder setIndividual(AccountTokenCreateParams.Identity.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Attestations { + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct; IP, date, and User Agent are expanded by Stripe. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct; IP, date, and User Agent are expanded by Stripe. + */ + @SerializedName("ownership_declaration") + OwnershipDeclaration ownershipDeclaration; + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + @SerializedName("persons_provided") + PersonsProvided personsProvided; + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity; IP, date, and User Agent are expanded by Stripe. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("terms_of_service") + TermsOfService termsOfService; + + private Attestations( + DirectorshipDeclaration directorshipDeclaration, + Map extraParams, + OwnershipDeclaration ownershipDeclaration, + PersonsProvided personsProvided, + RepresentativeDeclaration representativeDeclaration, + TermsOfService termsOfService) { + this.directorshipDeclaration = directorshipDeclaration; + this.extraParams = extraParams; + this.ownershipDeclaration = ownershipDeclaration; + this.personsProvided = personsProvided; + this.representativeDeclaration = representativeDeclaration; + this.termsOfService = termsOfService; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DirectorshipDeclaration directorshipDeclaration; + + private Map extraParams; + + private OwnershipDeclaration ownershipDeclaration; + + private PersonsProvided personsProvided; + + private RepresentativeDeclaration representativeDeclaration; + + private TermsOfService termsOfService; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations build() { + return new AccountTokenCreateParams.Identity.Attestations( + this.directorshipDeclaration, + this.extraParams, + this.ownershipDeclaration, + this.personsProvided, + this.representativeDeclaration, + this.termsOfService); + } + + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct; IP, date, and User Agent are expanded by Stripe. + */ + public Builder setDirectorshipDeclaration( + AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration + directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + 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 AccountTokenCreateParams.Identity.Attestations#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Attestations#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct; IP, date, and User Agent are expanded by Stripe. + */ + public Builder setOwnershipDeclaration( + AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration + ownershipDeclaration) { + this.ownershipDeclaration = ownershipDeclaration; + return this; + } + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + public Builder setPersonsProvided( + AccountTokenCreateParams.Identity.Attestations.PersonsProvided personsProvided) { + this.personsProvided = personsProvided; + return this; + } + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity; IP, date, and User Agent are expanded by Stripe. + */ + public Builder setRepresentativeDeclaration( + AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration + representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + + /** Attestations of accepted terms of service agreements. */ + public Builder setTermsOfService( + AccountTokenCreateParams.Identity.Attestations.TermsOfService termsOfService) { + this.termsOfService = termsOfService; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DirectorshipDeclaration { + /** A boolean indicating if the directors information has been attested. */ + @SerializedName("attested") + Boolean attested; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 DirectorshipDeclaration(Boolean attested, Map extraParams) { + this.attested = attested; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean attested; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration build() { + return new AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration( + this.attested, this.extraParams); + } + + /** A boolean indicating if the directors information has been attested. */ + public Builder setAttested(Boolean attested) { + this.attested = attested; + 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 + * AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration#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 + @EqualsAndHashCode(callSuper = false) + public static class OwnershipDeclaration { + /** A boolean indicating if the beneficial owner information has been attested. */ + @SerializedName("attested") + Boolean attested; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 OwnershipDeclaration(Boolean attested, Map extraParams) { + this.attested = attested; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean attested; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration build() { + return new AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration( + this.attested, this.extraParams); + } + + /** A boolean indicating if the beneficial owner information has been attested. */ + public Builder setAttested(Boolean attested) { + this.attested = attested; + 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 + * AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration#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 + @EqualsAndHashCode(callSuper = false) + public static class PersonsProvided { + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + @SerializedName("directors") + Boolean directors; + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + @SerializedName("executives") + Boolean executives; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after creating + * all the company’s owners with the Persons API. + */ + @SerializedName("owners") + Boolean owners; + + /** Reason for why the company is exempt from providing ownership information. */ + @SerializedName("ownership_exemption_reason") + OwnershipExemptionReason ownershipExemptionReason; + + private PersonsProvided( + Boolean directors, + Boolean executives, + Map extraParams, + Boolean owners, + OwnershipExemptionReason ownershipExemptionReason) { + this.directors = directors; + this.executives = executives; + this.extraParams = extraParams; + this.owners = owners; + this.ownershipExemptionReason = ownershipExemptionReason; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean directors; + + private Boolean executives; + + private Map extraParams; + + private Boolean owners; + + private OwnershipExemptionReason ownershipExemptionReason; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.PersonsProvided build() { + return new AccountTokenCreateParams.Identity.Attestations.PersonsProvided( + this.directors, + this.executives, + this.extraParams, + this.owners, + this.ownershipExemptionReason); + } + + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + public Builder setDirectors(Boolean directors) { + this.directors = directors; + return this; + } + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + public Builder setExecutives(Boolean executives) { + this.executives = executives; + 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 + * AccountTokenCreateParams.Identity.Attestations.PersonsProvided#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.PersonsProvided#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after + * creating all the company’s owners with the Persons API. + */ + public Builder setOwners(Boolean owners) { + this.owners = owners; + return this; + } + + /** Reason for why the company is exempt from providing ownership information. */ + public Builder setOwnershipExemptionReason( + AccountTokenCreateParams.Identity.Attestations.PersonsProvided + .OwnershipExemptionReason + ownershipExemptionReason) { + this.ownershipExemptionReason = ownershipExemptionReason; + return this; + } + } + + public enum OwnershipExemptionReason implements ApiRequestParams.EnumParam { + @SerializedName("qualified_entity_exceeds_ownership_threshold") + QUALIFIED_ENTITY_EXCEEDS_OWNERSHIP_THRESHOLD( + "qualified_entity_exceeds_ownership_threshold"), + + @SerializedName("qualifies_as_financial_institution") + QUALIFIES_AS_FINANCIAL_INSTITUTION("qualifies_as_financial_institution"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + OwnershipExemptionReason(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** + * A boolean indicating if the representative is authorized to act as the representative of + * their legal entity. + */ + @SerializedName("attested") + Boolean attested; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 RepresentativeDeclaration(Boolean attested, Map extraParams) { + this.attested = attested; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean attested; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration build() { + return new AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration( + this.attested, this.extraParams); + } + + /** + * A boolean indicating if the representative is authorized to act as the representative + * of their legal entity. + */ + public Builder setAttested(Boolean attested) { + this.attested = attested; + 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 + * AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration#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 + @EqualsAndHashCode(callSuper = false) + public static class TermsOfService { + /** + * Details on the Account's acceptance of the [Stripe Services Agreement]; IP, date, and + * User Agent are expanded by Stripe. + */ + @SerializedName("account") + Account account; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Details on the Account's acceptance of Treasury-specific terms of service; IP, date, and + * User Agent are expanded by Stripe. + */ + @SerializedName("storer") + Storer storer; + + private TermsOfService(Account account, Map extraParams, Storer storer) { + this.account = account; + this.extraParams = extraParams; + this.storer = storer; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Account account; + + private Map extraParams; + + private Storer storer; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.TermsOfService build() { + return new AccountTokenCreateParams.Identity.Attestations.TermsOfService( + this.account, this.extraParams, this.storer); + } + + /** + * Details on the Account's acceptance of the [Stripe Services Agreement]; IP, date, and + * User Agent are expanded by Stripe. + */ + public Builder setAccount( + AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account account) { + this.account = account; + 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 + * AccountTokenCreateParams.Identity.Attestations.TermsOfService#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Details on the Account's acceptance of Treasury-specific terms of service; IP, date, + * and User Agent are expanded by Stripe. + */ + public Builder setStorer( + AccountTokenCreateParams.Identity.Attestations.TermsOfService.Storer storer) { + this.storer = storer; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Account { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 boolean value indicating if the terms of service have been accepted. */ + @SerializedName("shown_and_accepted") + Boolean shownAndAccepted; + + private Account(Map extraParams, Boolean shownAndAccepted) { + this.extraParams = extraParams; + this.shownAndAccepted = shownAndAccepted; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean shownAndAccepted; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account build() { + return new AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account( + this.extraParams, this.shownAndAccepted); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account#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 boolean value indicating if the terms of service have been accepted. */ + public Builder setShownAndAccepted(Boolean shownAndAccepted) { + this.shownAndAccepted = shownAndAccepted; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Storer { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 boolean value indicating if the terms of service have been accepted. */ + @SerializedName("shown_and_accepted") + Boolean shownAndAccepted; + + private Storer(Map extraParams, Boolean shownAndAccepted) { + this.extraParams = extraParams; + this.shownAndAccepted = shownAndAccepted; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean shownAndAccepted; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.TermsOfService.Storer build() { + return new AccountTokenCreateParams.Identity.Attestations.TermsOfService.Storer( + this.extraParams, this.shownAndAccepted); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService.Storer#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService.Storer#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 boolean value indicating if the terms of service have been accepted. */ + public Builder setShownAndAccepted(Boolean shownAndAccepted) { + this.shownAndAccepted = shownAndAccepted; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails { + /** The business registration address of the business entity. */ + @SerializedName("address") + Address address; + + /** The business gross annual revenue for its preceding fiscal year. */ + @SerializedName("annual_revenue") + AnnualRevenue annualRevenue; + + /** A document verifying the business. */ + @SerializedName("documents") + Documents documents; + + /** + * An estimated upper bound of employees, contractors, vendors, etc. currently working for the + * business. + */ + @SerializedName("estimated_worker_count") + Long estimatedWorkerCount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The ID numbers of a business entity. */ + @SerializedName("id_numbers") + List idNumbers; + + /** An estimate of the monthly revenue of the business. */ + @SerializedName("monthly_estimated_revenue") + MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + /** The phone number of the Business Entity. */ + @SerializedName("phone") + String phone; + + /** The business legal name. */ + @SerializedName("registered_name") + String registeredName; + + /** The business registration address of the business entity in non latin script. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The business legal name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The category identifying the legal structure of the business. */ + @SerializedName("structure") + Structure structure; + + private BusinessDetails( + Address address, + AnnualRevenue annualRevenue, + Documents documents, + Long estimatedWorkerCount, + Map extraParams, + List idNumbers, + MonthlyEstimatedRevenue monthlyEstimatedRevenue, + String phone, + String registeredName, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + Structure structure) { + this.address = address; + this.annualRevenue = annualRevenue; + this.documents = documents; + this.estimatedWorkerCount = estimatedWorkerCount; + this.extraParams = extraParams; + this.idNumbers = idNumbers; + this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; + this.phone = phone; + this.registeredName = registeredName; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.structure = structure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private AnnualRevenue annualRevenue; + + private Documents documents; + + private Long estimatedWorkerCount; + + private Map extraParams; + + private List idNumbers; + + private MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + private String phone; + + private String registeredName; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private Structure structure; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails build() { + return new AccountTokenCreateParams.Identity.BusinessDetails( + this.address, + this.annualRevenue, + this.documents, + this.estimatedWorkerCount, + this.extraParams, + this.idNumbers, + this.monthlyEstimatedRevenue, + this.phone, + this.registeredName, + this.scriptAddresses, + this.scriptNames, + this.structure); + } + + /** The business registration address of the business entity. */ + public Builder setAddress( + AccountTokenCreateParams.Identity.BusinessDetails.Address address) { + this.address = address; + return this; + } + + /** The business gross annual revenue for its preceding fiscal year. */ + public Builder setAnnualRevenue( + AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** A document verifying the business. */ + public Builder setDocuments( + AccountTokenCreateParams.Identity.BusinessDetails.Documents documents) { + this.documents = documents; + return this; + } + + /** + * An estimated upper bound of employees, contractors, vendors, etc. currently working for + * the business. + */ + public Builder setEstimatedWorkerCount(Long estimatedWorkerCount) { + this.estimatedWorkerCount = estimatedWorkerCount; + 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 AccountTokenCreateParams.Identity.BusinessDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails#idNumbers} for the field documentation. + */ + public Builder addIdNumber( + AccountTokenCreateParams.Identity.BusinessDetails.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber( + List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** An estimate of the monthly revenue of the business. */ + public Builder setMonthlyEstimatedRevenue( + AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + monthlyEstimatedRevenue) { + this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; + return this; + } + + /** The phone number of the Business Entity. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The business legal name. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + + /** The business registration address of the business entity in non latin script. */ + public Builder setScriptAddresses( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The business legal name in non latin script. */ + public Builder setScriptNames( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The category identifying the legal structure of the business. */ + public Builder setStructure( + AccountTokenCreateParams.Identity.BusinessDetails.Structure structure) { + this.structure = structure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Address build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 AccountTokenCreateParams.Identity.BusinessDetails.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 AccountTokenCreateParams.Identity.BusinessDetails.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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AnnualRevenue { + /** A non-negative integer representing the amount in the smallest currency unit. */ + @SerializedName("amount") + Amount amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + @SerializedName("fiscal_year_end") + String fiscalYearEnd; + + private AnnualRevenue( + Amount amount, Map extraParams, String fiscalYearEnd) { + this.amount = amount; + this.extraParams = extraParams; + this.fiscalYearEnd = fiscalYearEnd; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + private String fiscalYearEnd; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue( + this.amount, this.extraParams, this.fiscalYearEnd); + } + + /** A non-negative integer representing the amount in the smallest currency unit. */ + public Builder setAmount(Amount amount) { + this.amount = amount; + 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 + * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue#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 close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + public Builder setFiscalYearEnd(String fiscalYearEnd) { + this.fiscalYearEnd = fiscalYearEnd; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that support the bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + @SerializedName("bank_account_ownership_verification") + BankAccountOwnershipVerification bankAccountOwnershipVerification; + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + @SerializedName("company_license") + CompanyLicense companyLicense; + + /** One or more documents showing the company’s Memorandum of Association. */ + @SerializedName("company_memorandum_of_association") + CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + @SerializedName("company_ministerial_decree") + CompanyMinisterialDecree companyMinisterialDecree; + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + @SerializedName("company_registration_verification") + CompanyRegistrationVerification companyRegistrationVerification; + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + @SerializedName("company_tax_id_verification") + CompanyTaxIdVerification companyTaxIdVerification; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A document verifying the business. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + @SerializedName("proof_of_registration") + ProofOfRegistration proofOfRegistration; + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + private Documents( + BankAccountOwnershipVerification bankAccountOwnershipVerification, + CompanyLicense companyLicense, + CompanyMemorandumOfAssociation companyMemorandumOfAssociation, + CompanyMinisterialDecree companyMinisterialDecree, + CompanyRegistrationVerification companyRegistrationVerification, + CompanyTaxIdVerification companyTaxIdVerification, + Map extraParams, + PrimaryVerification primaryVerification, + ProofOfAddress proofOfAddress, + ProofOfRegistration proofOfRegistration, + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { + this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; + this.companyLicense = companyLicense; + this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; + this.companyMinisterialDecree = companyMinisterialDecree; + this.companyRegistrationVerification = companyRegistrationVerification; + this.companyTaxIdVerification = companyTaxIdVerification; + this.extraParams = extraParams; + this.primaryVerification = primaryVerification; + this.proofOfAddress = proofOfAddress; + this.proofOfRegistration = proofOfRegistration; + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccountOwnershipVerification bankAccountOwnershipVerification; + + private CompanyLicense companyLicense; + + private CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + private CompanyMinisterialDecree companyMinisterialDecree; + + private CompanyRegistrationVerification companyRegistrationVerification; + + private CompanyTaxIdVerification companyTaxIdVerification; + + private Map extraParams; + + private PrimaryVerification primaryVerification; + + private ProofOfAddress proofOfAddress; + + private ProofOfRegistration proofOfRegistration; + + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents( + this.bankAccountOwnershipVerification, + this.companyLicense, + this.companyMemorandumOfAssociation, + this.companyMinisterialDecree, + this.companyRegistrationVerification, + this.companyTaxIdVerification, + this.extraParams, + this.primaryVerification, + this.proofOfAddress, + this.proofOfRegistration, + this.proofOfUltimateBeneficialOwnership); + } + + /** + * One or more documents that support the bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + public Builder setBankAccountOwnershipVerification( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification + bankAccountOwnershipVerification) { + this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; + return this; + } + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + public Builder setCompanyLicense( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense + companyLicense) { + this.companyLicense = companyLicense; + return this; + } + + /** One or more documents showing the company’s Memorandum of Association. */ + public Builder setCompanyMemorandumOfAssociation( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation + companyMemorandumOfAssociation) { + this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; + return this; + } + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + public Builder setCompanyMinisterialDecree( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree + companyMinisterialDecree) { + this.companyMinisterialDecree = companyMinisterialDecree; + return this; + } + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + public Builder setCompanyRegistrationVerification( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification + companyRegistrationVerification) { + this.companyRegistrationVerification = companyRegistrationVerification; + return this; + } + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + public Builder setCompanyTaxIdVerification( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification + companyTaxIdVerification) { + this.companyTaxIdVerification = companyTaxIdVerification; + 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 + * AccountTokenCreateParams.Identity.BusinessDetails.Documents#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A document verifying the business. */ + public Builder setPrimaryVerification( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** One or more documents that demonstrate proof of address. */ + public Builder setProofOfAddress( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress + proofOfAddress) { + this.proofOfAddress = proofOfAddress; + return this; + } + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + public Builder setProofOfRegistration( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration + proofOfRegistration) { + this.proofOfRegistration = proofOfRegistration; + return this; + } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + public Builder setProofOfUltimateBeneficialOwnership( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership + proofOfUltimateBeneficialOwnership) { + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccountOwnershipVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private BankAccountOwnershipVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyLicense { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyLicense(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#files} for + * the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#files} for + * the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMemorandumOfAssociation { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyMemorandumOfAssociation( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMinisterialDecree { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyMinisterialDecree( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMinisterialDecree + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMinisterialDecree(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree + .Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyRegistrationVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyRegistrationVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyTaxIdVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyTaxIdVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyTaxIdVerification + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyTaxIdVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification + .Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .PrimaryVerification(this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification#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 file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + .FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + .FrontBack + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .PrimaryVerification.FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + 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 + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfAddress(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for + * the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for + * the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfRegistration { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfRegistration( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfRegistration(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfUltimateBeneficialOwnership { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfUltimateBeneficialOwnership( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 registrar of the ID number (Only valid for DE ID number types). */ + @SerializedName("registrar") + String registrar; + + /** Required. Open Enum. The ID number type of a business entity. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber( + Map extraParams, String registrar, Type type, String value) { + this.extraParams = extraParams; + this.registrar = registrar; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registrar; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.IdNumber build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.IdNumber( + this.extraParams, this.registrar, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails.IdNumber#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails.IdNumber#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 registrar of the ID number (Only valid for DE ID number types). */ + public Builder setRegistrar(String registrar) { + this.registrar = registrar; + return this; + } + + /** Required. Open Enum. The ID number type of a business entity. */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_crn") + AE_CRN("ae_crn"), + + @SerializedName("ae_vat") + AE_VAT("ae_vat"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuit") + AR_CUIT("ar_cuit"), + + @SerializedName("at_fn") + AT_FN("at_fn"), + + @SerializedName("au_abn") + AU_ABN("au_abn"), + + @SerializedName("au_acn") + AU_ACN("au_acn"), + + @SerializedName("au_in") + AU_IN("au_in"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("be_cbe") + BE_CBE("be_cbe"), + + @SerializedName("bg_uic") + BG_UIC("bg_uic"), + + @SerializedName("br_cnpj") + BR_CNPJ("br_cnpj"), + + @SerializedName("ca_cn") + CA_CN("ca_cn"), + + @SerializedName("ca_crarr") + CA_CRARR("ca_crarr"), + + @SerializedName("ca_neq") + CA_NEQ("ca_neq"), + + @SerializedName("ca_rid") + CA_RID("ca_rid"), + + @SerializedName("ch_chid") + CH_CHID("ch_chid"), + + @SerializedName("ch_uid") + CH_UID("ch_uid"), + + @SerializedName("cr_cpj") + CR_CPJ("cr_cpj"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cz_ico") + CZ_ICO("cz_ico"), + + @SerializedName("de_hrn") + DE_HRN("de_hrn"), + + @SerializedName("de_vat") + DE_VAT("de_vat"), + + @SerializedName("dk_cvr") + DK_CVR("dk_cvr"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ee_rk") + EE_RK("ee_rk"), + + @SerializedName("es_cif") + ES_CIF("es_cif"), + + @SerializedName("fi_yt") + FI_YT("fi_yt"), + + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_vat") + FR_VAT("fr_vat"), + + @SerializedName("gb_crn") + GB_CRN("gb_crn"), + + @SerializedName("gi_crn") + GI_CRN("gi_crn"), + + @SerializedName("gr_gemi") + GR_GEMI("gr_gemi"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_br") + HK_BR("hk_br"), + + @SerializedName("hk_cr") + HK_CR("hk_cr"), + + @SerializedName("hk_mbs") + HK_MBS("hk_mbs"), + + @SerializedName("hu_cjs") + HU_CJS("hu_cjs"), + + @SerializedName("ie_crn") + IE_CRN("ie_crn"), + + @SerializedName("it_rea") + IT_REA("it_rea"), + + @SerializedName("it_vat") + IT_VAT("it_vat"), + + @SerializedName("jp_cn") + JP_CN("jp_cn"), + + @SerializedName("kz_bin") + KZ_BIN("kz_bin"), + + @SerializedName("li_uid") + LI_UID("li_uid"), + + @SerializedName("lt_ccrn") + LT_CCRN("lt_ccrn"), + + @SerializedName("lu_rcs") + LU_RCS("lu_rcs"), + + @SerializedName("lv_urn") + LV_URN("lv_urn"), + + @SerializedName("mt_crn") + MT_CRN("mt_crn"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_brn") + MY_BRN("my_brn"), + + @SerializedName("my_coid") + MY_COID("my_coid"), + + @SerializedName("my_sst") + MY_SST("my_sst"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("nl_kvk") + NL_KVK("nl_kvk"), + + @SerializedName("no_orgnr") + NO_ORGNR("no_orgnr"), + + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + + @SerializedName("pe_ruc") + PE_RUC("pe_ruc"), + + @SerializedName("pk_ntn") + PK_NTN("pk_ntn"), + + @SerializedName("pl_regon") + PL_REGON("pl_regon"), + + @SerializedName("pt_vat") + PT_VAT("pt_vat"), + + @SerializedName("ro_cui") + RO_CUI("ro_cui"), + + @SerializedName("sa_crn") + SA_CRN("sa_crn"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_orgnr") + SE_ORGNR("se_orgnr"), + + @SerializedName("sg_uen") + SG_UEN("sg_uen"), + + @SerializedName("si_msp") + SI_MSP("si_msp"), + + @SerializedName("sk_ico") + SK_ICO("sk_ico"), + + @SerializedName("th_crn") + TH_CRN("th_crn"), + + @SerializedName("th_prn") + TH_PRN("th_prn"), + + @SerializedName("th_tin") + TH_TIN("th_tin"), + + @SerializedName("us_ein") + US_EIN("us_ein"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MonthlyEstimatedRevenue { + /** A non-negative integer representing the amount in the smallest currency unit. */ + @SerializedName("amount") + Amount amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MonthlyEstimatedRevenue(Amount amount, Map extraParams) { + this.amount = amount; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue( + this.amount, this.extraParams); + } + + /** A non-negative integer representing the amount in the smallest currency unit. */ + public Builder setAmount(Amount amount) { + this.amount = amount; + 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 + * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue#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 + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana#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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji#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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana name. */ + @SerializedName("kana") + Kana kana; + + /** Kanji name. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana name. */ + public Builder setKana( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji name. */ + public Builder setKanji( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Registered name of the business. */ + @SerializedName("registered_name") + String registeredName; + + private Kana(Map extraParams, String registeredName) { + this.extraParams = extraParams; + this.registeredName = registeredName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registeredName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana( + this.extraParams, this.registeredName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Registered name of the business. */ + @SerializedName("registered_name") + String registeredName; + + private Kanji(Map extraParams, String registeredName) { + this.extraParams = extraParams; + this.registeredName = registeredName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registeredName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji( + this.extraParams, this.registeredName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + } + + public enum Structure implements ApiRequestParams.EnumParam { + @SerializedName("cooperative") + COOPERATIVE("cooperative"), + + @SerializedName("free_zone_establishment") + FREE_ZONE_ESTABLISHMENT("free_zone_establishment"), + + @SerializedName("free_zone_llc") + FREE_ZONE_LLC("free_zone_llc"), + + @SerializedName("governmental_unit") + GOVERNMENTAL_UNIT("governmental_unit"), + + @SerializedName("government_instrumentality") + GOVERNMENT_INSTRUMENTALITY("government_instrumentality"), + + @SerializedName("incorporated_association") + INCORPORATED_ASSOCIATION("incorporated_association"), + + @SerializedName("incorporated_non_profit") + INCORPORATED_NON_PROFIT("incorporated_non_profit"), + + @SerializedName("incorporated_partnership") + INCORPORATED_PARTNERSHIP("incorporated_partnership"), + + @SerializedName("limited_liability_partnership") + LIMITED_LIABILITY_PARTNERSHIP("limited_liability_partnership"), + + @SerializedName("llc") + LLC("llc"), + + @SerializedName("multi_member_llc") + MULTI_MEMBER_LLC("multi_member_llc"), + + @SerializedName("private_company") + PRIVATE_COMPANY("private_company"), + + @SerializedName("private_corporation") + PRIVATE_CORPORATION("private_corporation"), + + @SerializedName("private_partnership") + PRIVATE_PARTNERSHIP("private_partnership"), + + @SerializedName("public_company") + PUBLIC_COMPANY("public_company"), + + @SerializedName("public_corporation") + PUBLIC_CORPORATION("public_corporation"), + + @SerializedName("public_listed_corporation") + PUBLIC_LISTED_CORPORATION("public_listed_corporation"), + + @SerializedName("public_partnership") + PUBLIC_PARTNERSHIP("public_partnership"), + + @SerializedName("registered_charity") + REGISTERED_CHARITY("registered_charity"), + + @SerializedName("single_member_llc") + SINGLE_MEMBER_LLC("single_member_llc"), + + @SerializedName("sole_establishment") + SOLE_ESTABLISHMENT("sole_establishment"), + + @SerializedName("sole_proprietorship") + SOLE_PROPRIETORSHIP("sole_proprietorship"), + + @SerializedName("tax_exempt_government_instrumentality") + TAX_EXEMPT_GOVERNMENT_INSTRUMENTALITY("tax_exempt_government_instrumentality"), + + @SerializedName("trust") + TRUST("trust"), + + @SerializedName("unincorporated_association") + UNINCORPORATED_ASSOCIATION("unincorporated_association"), + + @SerializedName("unincorporated_non_profit") + UNINCORPORATED_NON_PROFIT("unincorporated_non_profit"), + + @SerializedName("unincorporated_partnership") + UNINCORPORATED_PARTNERSHIP("unincorporated_partnership"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Structure(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** Additional addresses associated with the individual. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the individual. */ + @SerializedName("additional_names") + List additionalNames; + + /** The individual's residential address. */ + @SerializedName("address") + Address address; + + /** The individual's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** The individual's email address. */ + @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 individual's first name. */ + @SerializedName("given_name") + String givenName; + + /** The identification numbers (e.g., SSN) associated with the individual. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The individual's gender (International regulations require either "male" or + * "female"). + */ + @SerializedName("legal_gender") + LegalGender legalGender; + + /** + * 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. + */ + @SerializedName("metadata") + Map metadata; + + /** + * The countries where the individual is a national. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("nationalities") + List nationalities; + + /** The individual's phone number. */ + @SerializedName("phone") + String phone; + + /** The individual's political exposure. */ + @SerializedName("political_exposure") + PoliticalExposure politicalExposure; + + /** The relationship that this individual has with the account's identity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The individuals primary name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The individual's last name. */ + @SerializedName("surname") + String surname; + + private Individual( + List additionalAddresses, + List additionalNames, + Address address, + DateOfBirth dateOfBirth, + Documents documents, + String email, + Map extraParams, + String givenName, + List idNumbers, + LegalGender legalGender, + Map metadata, + List nationalities, + String phone, + PoliticalExposure politicalExposure, + Relationship relationship, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + String surname) { + this.additionalAddresses = additionalAddresses; + this.additionalNames = additionalNames; + this.address = address; + this.dateOfBirth = dateOfBirth; + this.documents = documents; + this.email = email; + this.extraParams = extraParams; + this.givenName = givenName; + this.idNumbers = idNumbers; + this.legalGender = legalGender; + this.metadata = metadata; + this.nationalities = nationalities; + this.phone = phone; + this.politicalExposure = politicalExposure; + this.relationship = relationship; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List + additionalAddresses; + + private List additionalNames; + + private Address address; + + private DateOfBirth dateOfBirth; + + private Documents documents; + + private String email; + + private Map extraParams; + + private String givenName; + + private List idNumbers; + + private LegalGender legalGender; + + private Map metadata; + + private List nationalities; + + private String phone; + + private PoliticalExposure politicalExposure; + + private Relationship relationship; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual build() { + return new AccountTokenCreateParams.Identity.Individual( + this.additionalAddresses, + this.additionalNames, + this.address, + this.dateOfBirth, + this.documents, + this.email, + this.extraParams, + this.givenName, + this.idNumbers, + this.legalGender, + this.metadata, + this.nationalities, + this.phone, + this.politicalExposure, + this.relationship, + this.scriptAddresses, + this.scriptNames, + this.surname); + } + + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#additionalAddresses} for the + * field documentation. + */ + public Builder addAdditionalAddress( + AccountTokenCreateParams.Identity.Individual.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#additionalAddresses} for the + * field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + + /** + * Add an element to `additionalNames` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#additionalNames} for the field + * documentation. + */ + public Builder addAdditionalName( + AccountTokenCreateParams.Identity.Individual.AdditionalName element) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.add(element); + return this; + } + + /** + * Add all elements to `additionalNames` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#additionalNames} for the field + * documentation. + */ + public Builder addAllAdditionalName( + List elements) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.addAll(elements); + return this; + } + + /** The individual's residential address. */ + public Builder setAddress(AccountTokenCreateParams.Identity.Individual.Address address) { + this.address = address; + return this; + } + + /** The individual's date of birth. */ + public Builder setDateOfBirth( + AccountTokenCreateParams.Identity.Individual.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + public Builder setDocuments( + AccountTokenCreateParams.Identity.Individual.Documents documents) { + this.documents = documents; + return this; + } + + /** The individual's email address. */ + 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 AccountTokenCreateParams.Identity.Individual#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual#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 individual's first name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual#idNumbers} for the field documentation. + */ + public Builder addIdNumber(AccountTokenCreateParams.Identity.Individual.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber( + List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** + * The individual's gender (International regulations require either "male" or + * "female"). + */ + public Builder setLegalGender( + AccountTokenCreateParams.Identity.Individual.LegalGender legalGender) { + this.legalGender = legalGender; + 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 + * AccountTokenCreateParams.Identity.Individual#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountTokenCreateParams.Identity.Individual#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. Map values can only be one of the following types: `String`, `EmptyParam`. See + * {@link AccountTokenCreateParams.Identity.Individual#metadata} for the field + * documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream() + .allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Add an element to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual#nationalities} for the field documentation. + */ + public Builder addNationality(String element) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.add(element); + return this; + } + + /** + * Add all elements to `nationalities` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#nationalities} for the field + * documentation. + */ + public Builder addAllNationality(List elements) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.addAll(elements); + return this; + } + + /** The individual's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The individual's political exposure. */ + public Builder setPoliticalExposure( + AccountTokenCreateParams.Identity.Individual.PoliticalExposure politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** The relationship that this individual has with the account's identity. */ + public Builder setRelationship( + AccountTokenCreateParams.Identity.Individual.Relationship relationship) { + this.relationship = relationship; + return this; + } + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + public Builder setScriptAddresses( + AccountTokenCreateParams.Identity.Individual.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The individuals primary name in non latin script. */ + public Builder setScriptNames( + AccountTokenCreateParams.Identity.Individual.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The individual's last name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** 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; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private AdditionalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + Purpose purpose, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + this.state = state; + this.town = town; + } + + 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 Purpose purpose; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.AdditionalAddress build() { + return new AccountTokenCreateParams.Identity.Individual.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** 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 + * AccountTokenCreateParams.Identity.Individual.AdditionalAddress#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.AdditionalAddress#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; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose( + AccountTokenCreateParams.Identity.Individual.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("registered") + REGISTERED("registered"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 person's full name. */ + @SerializedName("full_name") + String fullName; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** Required. The purpose or type of the additional name. */ + @SerializedName("purpose") + Purpose purpose; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private AdditionalName( + Map extraParams, + String fullName, + String givenName, + Purpose purpose, + String surname) { + this.extraParams = extraParams; + this.fullName = fullName; + this.givenName = givenName; + this.purpose = purpose; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String fullName; + + private String givenName; + + private Purpose purpose; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.AdditionalName build() { + return new AccountTokenCreateParams.Identity.Individual.AdditionalName( + this.extraParams, this.fullName, this.givenName, this.purpose, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.AdditionalName#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.AdditionalName#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 person's full name. */ + public Builder setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** Required. The purpose or type of the additional name. */ + public Builder setPurpose( + AccountTokenCreateParams.Identity.Individual.AdditionalName.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("alias") + ALIAS("alias"), + + @SerializedName("maiden") + MAIDEN("maiden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Address build() { + return new AccountTokenCreateParams.Identity.Individual.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 AccountTokenCreateParams.Identity.Individual.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 AccountTokenCreateParams.Identity.Individual.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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth { + /** Required. The day of the birth. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth. */ + @SerializedName("month") + Long month; + + /** Required. The year of birth. */ + @SerializedName("year") + Long year; + + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.DateOfBirth build() { + return new AccountTokenCreateParams.Identity.Individual.DateOfBirth( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of the birth. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.DateOfBirth#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.DateOfBirth#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + @SerializedName("passport") + Passport passport; + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + @SerializedName("visa") + Visa visa; + + private Documents( + CompanyAuthorization companyAuthorization, + Map extraParams, + Passport passport, + PrimaryVerification primaryVerification, + SecondaryVerification secondaryVerification, + Visa visa) { + this.companyAuthorization = companyAuthorization; + this.extraParams = extraParams; + this.passport = passport; + this.primaryVerification = primaryVerification; + this.secondaryVerification = secondaryVerification; + this.visa = visa; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CompanyAuthorization companyAuthorization; + + private Map extraParams; + + private Passport passport; + + private PrimaryVerification primaryVerification; + + private SecondaryVerification secondaryVerification; + + private Visa visa; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents build() { + return new AccountTokenCreateParams.Identity.Individual.Documents( + this.companyAuthorization, + this.extraParams, + this.passport, + this.primaryVerification, + this.secondaryVerification, + this.visa); + } + + /** + * One or more documents that demonstrate proof that this person is authorized to + * represent the company. + */ + public Builder setCompanyAuthorization( + AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization + companyAuthorization) { + this.companyAuthorization = companyAuthorization; + 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 AccountTokenCreateParams.Identity.Individual.Documents#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.Documents#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + public Builder setPassport( + AccountTokenCreateParams.Identity.Individual.Documents.Passport passport) { + this.passport = passport; + return this; + } + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + public Builder setPrimaryVerification( + AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification + primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + public Builder setSecondaryVerification( + AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification + secondaryVerification) { + this.secondaryVerification = secondaryVerification; + return this; + } + + /** + * One or more documents showing the person’s visa required for living in the country + * where they are residing. + */ + public Builder setVisa(AccountTokenCreateParams.Identity.Individual.Documents.Visa visa) { + this.visa = visa; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyAuthorization( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents + .CompanyAuthorization(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passport { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Passport(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.Passport build() { + return new AccountTokenCreateParams.Identity.Individual.Documents.Passport( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Passport#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Passport#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Passport#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Passport#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.Passport.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification#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 file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification + .FrontBack + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents + .PrimaryVerification.FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + 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 + * AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private SecondaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents + .SecondaryVerification(this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification#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 file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification + .FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification + .FrontBack + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents + .SecondaryVerification.FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + 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 + * AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Visa { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Visa(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.Visa build() { + return new AccountTokenCreateParams.Identity.Individual.Documents.Visa( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Visa#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Visa#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Visa#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Visa#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.Visa.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 ID number type of an individual. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber(Map extraParams, Type type, String value) { + this.extraParams = extraParams; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.IdNumber build() { + return new AccountTokenCreateParams.Identity.Individual.IdNumber( + this.extraParams, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.IdNumber#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.IdNumber#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 ID number type of an individual. */ + public Builder setType(AccountTokenCreateParams.Identity.Individual.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_eid") + AE_EID("ae_eid"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_brc") + BD_BRC("bd_brc"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("bd_nid") + BD_NID("bd_nid"), + + @SerializedName("br_cpf") + BR_CPF("br_cpf"), + + @SerializedName("cr_cpf") + CR_CPF("cr_cpf"), + + @SerializedName("cr_dimex") + CR_DIMEX("cr_dimex"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_id") + HK_ID("hk_id"), + + @SerializedName("kz_iin") + KZ_IIN("kz_iin"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_nric") + MY_NRIC("my_nric"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("nl_bsn") + NL_BSN("nl_bsn"), + + @SerializedName("pe_dni") + PE_DNI("pe_dni"), + + @SerializedName("pk_cnic") + PK_CNIC("pk_cnic"), + + @SerializedName("pk_snic") + PK_SNIC("pk_snic"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("sg_fin") + SG_FIN("sg_fin"), + + @SerializedName("sg_nric") + SG_NRIC("sg_nric"), + + @SerializedName("th_lc") + TH_LC("th_lc"), + + @SerializedName("th_pin") + TH_PIN("th_pin"), + + @SerializedName("us_itin") + US_ITIN("us_itin"), + + @SerializedName("us_itin_last_4") + US_ITIN_LAST_4("us_itin_last_4"), + + @SerializedName("us_ssn") + US_SSN("us_ssn"), + + @SerializedName("us_ssn_last_4") + US_SSN_LAST_4("us_ssn_last_4"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Relationship { + /** + * Whether the person is a director of the account's identity. Directors are typically + * members of the governing board of the company, or responsible for ensuring the company + * meets its regulatory obligations. + */ + @SerializedName("director") + Boolean director; + + /** + * Whether the person has significant responsibility to control, manage, or direct the + * organization. + */ + @SerializedName("executive") + Boolean executive; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the person is an owner of the account’s identity. */ + @SerializedName("owner") + Boolean owner; + + /** The percent owned by the person of the account's legal entity. */ + @SerializedName("percent_ownership") + String percentOwnership; + + /** The person's title (e.g., CEO, Support Engineer). */ + @SerializedName("title") + String title; + + private Relationship( + Boolean director, + Boolean executive, + Map extraParams, + Boolean owner, + String percentOwnership, + String title) { + this.director = director; + this.executive = executive; + this.extraParams = extraParams; + this.owner = owner; + this.percentOwnership = percentOwnership; + this.title = title; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean director; + + private Boolean executive; + + private Map extraParams; + + private Boolean owner; + + private String percentOwnership; + + private String title; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Relationship build() { + return new AccountTokenCreateParams.Identity.Individual.Relationship( + this.director, + this.executive, + this.extraParams, + this.owner, + this.percentOwnership, + this.title); + } + + /** + * Whether the person is a director of the account's identity. Directors are typically + * members of the governing board of the company, or responsible for ensuring the company + * meets its regulatory obligations. + */ + public Builder setDirector(Boolean director) { + this.director = director; + return this; + } + + /** + * Whether the person has significant responsibility to control, manage, or direct the + * organization. + */ + public Builder setExecutive(Boolean executive) { + this.executive = executive; + 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 AccountTokenCreateParams.Identity.Individual.Relationship#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.Relationship#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the person is an owner of the account’s identity. */ + public Builder setOwner(Boolean owner) { + this.owner = owner; + return this; + } + + /** The percent owned by the person of the account's legal entity. */ + public Builder setPercentOwnership(String percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** The person's title (e.g., CEO, Support Engineer). */ + public Builder setTitle(String title) { + this.title = title; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptAddresses build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptAddresses( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana( + AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji( + AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana#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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji#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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptNames build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptNames( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.ScriptNames#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.ScriptNames#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Persons name in kana script. */ + public Builder setKana( + AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Persons name in kanji script. */ + public Builder setKanji( + AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kana(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana#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 person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kanji(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji#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 person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + } + + public enum LegalGender implements ApiRequestParams.EnumParam { + @SerializedName("female") + FEMALE("female"), + + @SerializedName("male") + MALE("male"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LegalGender(String value) { + this.value = value; + } + } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } + } + + public enum EntityType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("government_entity") + GOVERNMENT_ENTITY("government_entity"), + + @SerializedName("individual") + INDIVIDUAL("individual"), + + @SerializedName("non_profit") + NON_PROFIT("non_profit"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EntityType(String value) { + this.value = value; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index bb966d0a272..d4d7d4af4e6 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -16,6 +16,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class AccountUpdateParams extends ApiRequestParams { + /** The account token generated by the account token api. */ + @SerializedName("account_token") + Object accountToken; + /** * An Account Configuration which allows the Account to take on a key persona across Stripe * products. @@ -73,6 +77,7 @@ public class AccountUpdateParams extends ApiRequestParams { Map metadata; private AccountUpdateParams( + Object accountToken, Configuration configuration, Object contactEmail, Dashboard dashboard, @@ -82,6 +87,7 @@ private AccountUpdateParams( Identity identity, List include, Map metadata) { + this.accountToken = accountToken; this.configuration = configuration; this.contactEmail = contactEmail; this.dashboard = dashboard; @@ -98,6 +104,8 @@ public static Builder builder() { } public static class Builder { + private Object accountToken; + private Configuration configuration; private Object contactEmail; @@ -119,6 +127,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams build() { return new AccountUpdateParams( + this.accountToken, this.configuration, this.contactEmail, this.dashboard, @@ -130,6 +139,18 @@ public AccountUpdateParams build() { this.metadata); } + /** The account token generated by the account token api. */ + public Builder setAccountToken(String accountToken) { + this.accountToken = accountToken; + return this; + } + + /** The account token generated by the account token api. */ + public Builder setAccountToken(EmptyParam accountToken) { + this.accountToken = accountToken; + return this; + } + /** * An Account Configuration which allows the Account to take on a key persona across Stripe * products. @@ -636,7 +657,7 @@ public static class AutomaticIndirectTax { /** * The data source used to identify the customer's tax location - defaults to {@code * identity_address}. Will only be used for automatic tax calculation on the customer's - * Invoices and Subscriptions. + * Invoices and Subscriptions. This behavior is now deprecated for new users. */ @SerializedName("location_source") LocationSource locationSource; @@ -746,7 +767,7 @@ public Builder setIpAddress(EmptyParam ipAddress) { /** * The data source used to identify the customer's tax location - defaults to {@code * identity_address}. Will only be used for automatic tax calculation on the customer's - * Invoices and Subscriptions. + * Invoices and Subscriptions. This behavior is now deprecated for new users. */ public Builder setLocationSource( AccountUpdateParams.Configuration.Customer.AutomaticIndirectTax.LocationSource @@ -1373,8 +1394,7 @@ public static class Capabilities { /** * Generates requirements for enabling automatic indirect tax calculation on this customer's * invoices or subscriptions. Recommended to request this capability if planning to enable - * automatic tax calculation on this customer's invoices or subscriptions. Uses the {@code - * location_source} field. + * automatic tax calculation on this customer's invoices or subscriptions. */ @SerializedName("automatic_indirect_tax") AutomaticIndirectTax automaticIndirectTax; @@ -1414,7 +1434,7 @@ public AccountUpdateParams.Configuration.Customer.Capabilities build() { * Generates requirements for enabling automatic indirect tax calculation on this * customer's invoices or subscriptions. Recommended to request this capability if * planning to enable automatic tax calculation on this customer's invoices or - * subscriptions. Uses the {@code location_source} field. + * subscriptions. */ public Builder setAutomaticIndirectTax( AccountUpdateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax @@ -8110,7 +8130,7 @@ public static class Recipient { * PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via * dashboard. Can also be explicitly set to {@code null} to clear the existing default * outbound destination. For further details about creating an Outbound Destination, see Collect + * href="https://docs.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details">Collect * recipient's payment details. */ @SerializedName("default_outbound_destination") @@ -8176,7 +8196,7 @@ public Builder setCapabilities( * PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via * dashboard. Can also be explicitly set to {@code null} to clear the existing default * outbound destination. For further details about creating an Outbound Destination, see Collect + * href="https://docs.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details">Collect * recipient's payment details. */ public Builder setDefaultOutboundDestination(String defaultOutboundDestination) { @@ -8189,7 +8209,7 @@ public Builder setDefaultOutboundDestination(String defaultOutboundDestination) * PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via * dashboard. Can also be explicitly set to {@code null} to clear the existing default * outbound destination. For further details about creating an Outbound Destination, see Collect + * href="https://docs.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details">Collect * recipient's payment details. */ public Builder setDefaultOutboundDestination(EmptyParam defaultOutboundDestination) { @@ -14908,6 +14928,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ao_nif") AO_NIF("ao_nif"), + @SerializedName("ar_cuit") + AR_CUIT("ar_cuit"), + @SerializedName("at_fn") AT_FN("at_fn"), @@ -18443,6 +18466,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ao_nif") AO_NIF("ao_nif"), + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + @SerializedName("az_tin") AZ_TIN("az_tin"), @@ -19600,6 +19626,9 @@ public enum Include implements ApiRequestParams.EnumParam { @SerializedName("defaults") DEFAULTS("defaults"), + @SerializedName("future_requirements") + FUTURE_REQUIREMENTS("future_requirements"), + @SerializedName("identity") IDENTITY("identity"), diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java index 0359efc61a8..3e428bab328 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java @@ -77,6 +77,10 @@ public class PersonCreateParams extends ApiRequestParams { @SerializedName("nationalities") List nationalities; + /** The person token generated by the person token api. */ + @SerializedName("person_token") + String personToken; + /** The phone number for this person. */ @SerializedName("phone") String phone; @@ -115,6 +119,7 @@ private PersonCreateParams( LegalGender legalGender, Map metadata, List nationalities, + String personToken, String phone, PoliticalExposure politicalExposure, Relationship relationship, @@ -134,6 +139,7 @@ private PersonCreateParams( this.legalGender = legalGender; this.metadata = metadata; this.nationalities = nationalities; + this.personToken = personToken; this.phone = phone; this.politicalExposure = politicalExposure; this.relationship = relationship; @@ -173,6 +179,8 @@ public static class Builder { private List nationalities; + private String personToken; + private String phone; private PoliticalExposure politicalExposure; @@ -201,6 +209,7 @@ public PersonCreateParams build() { this.legalGender, this.metadata, this.nationalities, + this.personToken, this.phone, this.politicalExposure, this.relationship, @@ -411,6 +420,12 @@ public Builder addAllNationality(List elements) { return this; } + /** The person token generated by the person token api. */ + public Builder setPersonToken(String personToken) { + this.personToken = personToken; + return this; + } + /** The phone number for this person. */ public Builder setPhone(String phone) { this.phone = phone; @@ -2292,6 +2307,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ao_nif") AO_NIF("ao_nif"), + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + @SerializedName("az_tin") AZ_TIN("az_tin"), diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java new file mode 100644 index 00000000000..52981796e9c --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java @@ -0,0 +1,3263 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.accounts; + +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.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PersonTokenCreateParams extends ApiRequestParams { + /** Additional addresses associated with the person. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the person. */ + @SerializedName("additional_names") + List additionalNames; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("additional_terms_of_service") + AdditionalTermsOfService additionalTermsOfService; + + /** The person's residential address. */ + @SerializedName("address") + Address address; + + /** The person's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** Email. */ + @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 person's first name. */ + @SerializedName("given_name") + String givenName; + + /** The identification numbers (e.g., SSN) associated with the person. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The person's gender (International regulations require either "male" or + * "female"). + */ + @SerializedName("legal_gender") + LegalGender legalGender; + + /** + * 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. + */ + @SerializedName("metadata") + Map metadata; + + /** The nationalities (countries) this person is associated with. */ + @SerializedName("nationalities") + List nationalities; + + /** The phone number for this person. */ + @SerializedName("phone") + String phone; + + /** The person's political exposure. */ + @SerializedName("political_exposure") + PoliticalExposure politicalExposure; + + /** The relationship that this person has with the Account's business or legal entity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The script names (e.g. non-Latin characters) associated with the person. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The person's last name. */ + @SerializedName("surname") + String surname; + + private PersonTokenCreateParams( + List additionalAddresses, + List additionalNames, + AdditionalTermsOfService additionalTermsOfService, + Address address, + DateOfBirth dateOfBirth, + Documents documents, + String email, + Map extraParams, + String givenName, + List idNumbers, + LegalGender legalGender, + Map metadata, + List nationalities, + String phone, + PoliticalExposure politicalExposure, + Relationship relationship, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + String surname) { + this.additionalAddresses = additionalAddresses; + this.additionalNames = additionalNames; + this.additionalTermsOfService = additionalTermsOfService; + this.address = address; + this.dateOfBirth = dateOfBirth; + this.documents = documents; + this.email = email; + this.extraParams = extraParams; + this.givenName = givenName; + this.idNumbers = idNumbers; + this.legalGender = legalGender; + this.metadata = metadata; + this.nationalities = nationalities; + this.phone = phone; + this.politicalExposure = politicalExposure; + this.relationship = relationship; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List additionalAddresses; + + private List additionalNames; + + private AdditionalTermsOfService additionalTermsOfService; + + private Address address; + + private DateOfBirth dateOfBirth; + + private Documents documents; + + private String email; + + private Map extraParams; + + private String givenName; + + private List idNumbers; + + private LegalGender legalGender; + + private Map metadata; + + private List nationalities; + + private String phone; + + private PoliticalExposure politicalExposure; + + private Relationship relationship; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams build() { + return new PersonTokenCreateParams( + this.additionalAddresses, + this.additionalNames, + this.additionalTermsOfService, + this.address, + this.dateOfBirth, + this.documents, + this.email, + this.extraParams, + this.givenName, + this.idNumbers, + this.legalGender, + this.metadata, + this.nationalities, + this.phone, + this.politicalExposure, + this.relationship, + this.scriptAddresses, + this.scriptNames, + this.surname); + } + + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PersonTokenCreateParams#additionalAddresses} for the field documentation. + */ + public Builder addAdditionalAddress(PersonTokenCreateParams.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PersonTokenCreateParams#additionalAddresses} for the field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + + /** + * Add an element to `additionalNames` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#additionalNames} for the field documentation. + */ + public Builder addAdditionalName(PersonTokenCreateParams.AdditionalName element) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.add(element); + return this; + } + + /** + * Add all elements to `additionalNames` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#additionalNames} for the field documentation. + */ + public Builder addAllAdditionalName(List elements) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.addAll(elements); + return this; + } + + /** Attestations of accepted terms of service agreements. */ + public Builder setAdditionalTermsOfService( + PersonTokenCreateParams.AdditionalTermsOfService additionalTermsOfService) { + this.additionalTermsOfService = additionalTermsOfService; + return this; + } + + /** The person's residential address. */ + public Builder setAddress(PersonTokenCreateParams.Address address) { + this.address = address; + return this; + } + + /** The person's date of birth. */ + public Builder setDateOfBirth(PersonTokenCreateParams.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + public Builder setDocuments(PersonTokenCreateParams.Documents documents) { + this.documents = documents; + return this; + } + + /** Email. */ + 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 + * PersonTokenCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams#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 person's first name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#idNumbers} for the field documentation. + */ + public Builder addIdNumber(PersonTokenCreateParams.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber(List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** + * The person's gender (International regulations require either "male" or + * "female"). + */ + public Builder setLegalGender(PersonTokenCreateParams.LegalGender legalGender) { + this.legalGender = legalGender; + 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 + * PersonTokenCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link + * PersonTokenCreateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Add an element to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#nationalities} for the field documentation. + */ + public Builder addNationality(String element) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.add(element); + return this; + } + + /** + * Add all elements to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#nationalities} for the field documentation. + */ + public Builder addAllNationality(List elements) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.addAll(elements); + return this; + } + + /** The phone number for this person. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The person's political exposure. */ + public Builder setPoliticalExposure( + PersonTokenCreateParams.PoliticalExposure politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** The relationship that this person has with the Account's business or legal entity. */ + public Builder setRelationship(PersonTokenCreateParams.Relationship relationship) { + this.relationship = relationship; + return this; + } + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + public Builder setScriptAddresses(PersonTokenCreateParams.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The script names (e.g. non-Latin characters) associated with the person. */ + public Builder setScriptNames(PersonTokenCreateParams.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The person's last name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** 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; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private AdditionalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + Purpose purpose, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + this.state = state; + this.town = town; + } + + 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 Purpose purpose; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.AdditionalAddress build() { + return new PersonTokenCreateParams.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** 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 + * PersonTokenCreateParams.AdditionalAddress#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.AdditionalAddress#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; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose(PersonTokenCreateParams.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("registered") + REGISTERED("registered"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 person's full name. */ + @SerializedName("full_name") + String fullName; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** Required. The purpose or type of the additional name. */ + @SerializedName("purpose") + Purpose purpose; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private AdditionalName( + Map extraParams, + String fullName, + String givenName, + Purpose purpose, + String surname) { + this.extraParams = extraParams; + this.fullName = fullName; + this.givenName = givenName; + this.purpose = purpose; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String fullName; + + private String givenName; + + private Purpose purpose; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.AdditionalName build() { + return new PersonTokenCreateParams.AdditionalName( + this.extraParams, this.fullName, this.givenName, this.purpose, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.AdditionalName#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.AdditionalName#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 person's full name. */ + public Builder setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** Required. The purpose or type of the additional name. */ + public Builder setPurpose(PersonTokenCreateParams.AdditionalName.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("alias") + ALIAS("alias"), + + @SerializedName("maiden") + MAIDEN("maiden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalTermsOfService { + /** + * Details on the Person's acceptance of the [Stripe Services Agreement]; IP, date, and User + * Agent are expanded by Stripe. + */ + @SerializedName("account") + Account account; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 AdditionalTermsOfService(Account account, Map extraParams) { + this.account = account; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Account account; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.AdditionalTermsOfService build() { + return new PersonTokenCreateParams.AdditionalTermsOfService(this.account, this.extraParams); + } + + /** + * Details on the Person's acceptance of the [Stripe Services Agreement]; IP, date, and User + * Agent are expanded by Stripe. + */ + public Builder setAccount(PersonTokenCreateParams.AdditionalTermsOfService.Account account) { + this.account = account; + 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 + * PersonTokenCreateParams.AdditionalTermsOfService#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.AdditionalTermsOfService#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 + @EqualsAndHashCode(callSuper = false) + public static class Account { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 boolean value indicating if the terms of service have been accepted. */ + @SerializedName("shown_and_accepted") + Boolean shownAndAccepted; + + private Account(Map extraParams, Boolean shownAndAccepted) { + this.extraParams = extraParams; + this.shownAndAccepted = shownAndAccepted; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean shownAndAccepted; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.AdditionalTermsOfService.Account build() { + return new PersonTokenCreateParams.AdditionalTermsOfService.Account( + this.extraParams, this.shownAndAccepted); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.AdditionalTermsOfService.Account#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.AdditionalTermsOfService.Account#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 boolean value indicating if the terms of service have been accepted. */ + public Builder setShownAndAccepted(Boolean shownAndAccepted) { + this.shownAndAccepted = shownAndAccepted; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Address build() { + return new PersonTokenCreateParams.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 + * PersonTokenCreateParams.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 PersonTokenCreateParams.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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth { + /** Required. The day of the birth. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth. */ + @SerializedName("month") + Long month; + + /** Required. The year of birth. */ + @SerializedName("year") + Long year; + + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.DateOfBirth build() { + return new PersonTokenCreateParams.DateOfBirth( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of the birth. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.DateOfBirth#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.DateOfBirth#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that demonstrate proof that this person is authorized to represent the + * company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** One or more documents showing the person’s passport page with photo and personal data. */ + @SerializedName("passport") + Passport passport; + + /** An identifying document showing the person's name, either a passport or local ID card. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where they + * are residing. + */ + @SerializedName("visa") + Visa visa; + + private Documents( + CompanyAuthorization companyAuthorization, + Map extraParams, + Passport passport, + PrimaryVerification primaryVerification, + SecondaryVerification secondaryVerification, + Visa visa) { + this.companyAuthorization = companyAuthorization; + this.extraParams = extraParams; + this.passport = passport; + this.primaryVerification = primaryVerification; + this.secondaryVerification = secondaryVerification; + this.visa = visa; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CompanyAuthorization companyAuthorization; + + private Map extraParams; + + private Passport passport; + + private PrimaryVerification primaryVerification; + + private SecondaryVerification secondaryVerification; + + private Visa visa; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents build() { + return new PersonTokenCreateParams.Documents( + this.companyAuthorization, + this.extraParams, + this.passport, + this.primaryVerification, + this.secondaryVerification, + this.visa); + } + + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + public Builder setCompanyAuthorization( + PersonTokenCreateParams.Documents.CompanyAuthorization companyAuthorization) { + this.companyAuthorization = companyAuthorization; + 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 + * PersonTokenCreateParams.Documents#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.Documents#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** One or more documents showing the person’s passport page with photo and personal data. */ + public Builder setPassport(PersonTokenCreateParams.Documents.Passport passport) { + this.passport = passport; + return this; + } + + /** An identifying document showing the person's name, either a passport or local ID card. */ + public Builder setPrimaryVerification( + PersonTokenCreateParams.Documents.PrimaryVerification primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + public Builder setSecondaryVerification( + PersonTokenCreateParams.Documents.SecondaryVerification secondaryVerification) { + this.secondaryVerification = secondaryVerification; + return this; + } + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + public Builder setVisa(PersonTokenCreateParams.Documents.Visa visa) { + this.visa = visa; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyAuthorization(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.CompanyAuthorization build() { + return new PersonTokenCreateParams.Documents.CompanyAuthorization( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.CompanyAuthorization#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.CompanyAuthorization#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.CompanyAuthorization#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.CompanyAuthorization#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonTokenCreateParams.Documents.CompanyAuthorization.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passport { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Passport(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.Passport build() { + return new PersonTokenCreateParams.Documents.Passport( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.Passport#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.Passport#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonTokenCreateParams.Documents.Passport.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification(Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.PrimaryVerification build() { + return new PersonTokenCreateParams.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.PrimaryVerification#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.PrimaryVerification#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 file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + public Builder setType(PersonTokenCreateParams.Documents.PrimaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack build() { + return new PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack( + this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(String back) { + this.back = back; + 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 + * PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private SecondaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.SecondaryVerification build() { + return new PersonTokenCreateParams.Documents.SecondaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.SecondaryVerification#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.SecondaryVerification#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 file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + public Builder setType(PersonTokenCreateParams.Documents.SecondaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack build() { + return new PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack( + this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(String back) { + this.back = back; + 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 + * PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Visa { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Visa(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.Visa build() { + return new PersonTokenCreateParams.Documents.Visa( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.Visa#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.Visa#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonTokenCreateParams.Documents.Visa.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 ID number type of an individual. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber(Map extraParams, Type type, String value) { + this.extraParams = extraParams; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.IdNumber build() { + return new PersonTokenCreateParams.IdNumber(this.extraParams, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.IdNumber#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.IdNumber#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 ID number type of an individual. */ + public Builder setType(PersonTokenCreateParams.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_eid") + AE_EID("ae_eid"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_brc") + BD_BRC("bd_brc"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("bd_nid") + BD_NID("bd_nid"), + + @SerializedName("br_cpf") + BR_CPF("br_cpf"), + + @SerializedName("cr_cpf") + CR_CPF("cr_cpf"), + + @SerializedName("cr_dimex") + CR_DIMEX("cr_dimex"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_id") + HK_ID("hk_id"), + + @SerializedName("kz_iin") + KZ_IIN("kz_iin"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_nric") + MY_NRIC("my_nric"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("nl_bsn") + NL_BSN("nl_bsn"), + + @SerializedName("pe_dni") + PE_DNI("pe_dni"), + + @SerializedName("pk_cnic") + PK_CNIC("pk_cnic"), + + @SerializedName("pk_snic") + PK_SNIC("pk_snic"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("sg_fin") + SG_FIN("sg_fin"), + + @SerializedName("sg_nric") + SG_NRIC("sg_nric"), + + @SerializedName("th_lc") + TH_LC("th_lc"), + + @SerializedName("th_pin") + TH_PIN("th_pin"), + + @SerializedName("us_itin") + US_ITIN("us_itin"), + + @SerializedName("us_itin_last_4") + US_ITIN_LAST_4("us_itin_last_4"), + + @SerializedName("us_ssn") + US_SSN("us_ssn"), + + @SerializedName("us_ssn_last_4") + US_SSN_LAST_4("us_ssn_last_4"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Relationship { + /** Whether the individual is an authorizer of the Account’s legal entity. */ + @SerializedName("authorizer") + Boolean authorizer; + + /** Indicates whether the person is a director of the associated legal entity. */ + @SerializedName("director") + Boolean director; + + /** Indicates whether the person is an executive of the associated legal entity. */ + @SerializedName("executive") + Boolean executive; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 person is a legal guardian of the associated legal entity. */ + @SerializedName("legal_guardian") + Boolean legalGuardian; + + /** Indicates whether the person is an owner of the associated legal entity. */ + @SerializedName("owner") + Boolean owner; + + /** The percentage of ownership the person has in the associated legal entity. */ + @SerializedName("percent_ownership") + String percentOwnership; + + /** Indicates whether the person is a representative of the associated legal entity. */ + @SerializedName("representative") + Boolean representative; + + /** The title or position the person holds in the associated legal entity. */ + @SerializedName("title") + String title; + + private Relationship( + Boolean authorizer, + Boolean director, + Boolean executive, + Map extraParams, + Boolean legalGuardian, + Boolean owner, + String percentOwnership, + Boolean representative, + String title) { + this.authorizer = authorizer; + this.director = director; + this.executive = executive; + this.extraParams = extraParams; + this.legalGuardian = legalGuardian; + this.owner = owner; + this.percentOwnership = percentOwnership; + this.representative = representative; + this.title = title; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean authorizer; + + private Boolean director; + + private Boolean executive; + + private Map extraParams; + + private Boolean legalGuardian; + + private Boolean owner; + + private String percentOwnership; + + private Boolean representative; + + private String title; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Relationship build() { + return new PersonTokenCreateParams.Relationship( + this.authorizer, + this.director, + this.executive, + this.extraParams, + this.legalGuardian, + this.owner, + this.percentOwnership, + this.representative, + this.title); + } + + /** Whether the individual is an authorizer of the Account’s legal entity. */ + public Builder setAuthorizer(Boolean authorizer) { + this.authorizer = authorizer; + return this; + } + + /** Indicates whether the person is a director of the associated legal entity. */ + public Builder setDirector(Boolean director) { + this.director = director; + return this; + } + + /** Indicates whether the person is an executive of the associated legal entity. */ + public Builder setExecutive(Boolean executive) { + this.executive = executive; + 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 + * PersonTokenCreateParams.Relationship#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.Relationship#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 person is a legal guardian of the associated legal entity. */ + public Builder setLegalGuardian(Boolean legalGuardian) { + this.legalGuardian = legalGuardian; + return this; + } + + /** Indicates whether the person is an owner of the associated legal entity. */ + public Builder setOwner(Boolean owner) { + this.owner = owner; + return this; + } + + /** The percentage of ownership the person has in the associated legal entity. */ + public Builder setPercentOwnership(String percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** Indicates whether the person is a representative of the associated legal entity. */ + public Builder setRepresentative(Boolean representative) { + this.representative = representative; + return this; + } + + /** The title or position the person holds in the associated legal entity. */ + public Builder setTitle(String title) { + this.title = title; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptAddresses build() { + return new PersonTokenCreateParams.ScriptAddresses(this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.ScriptAddresses#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana(PersonTokenCreateParams.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji(PersonTokenCreateParams.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptAddresses.Kana build() { + return new PersonTokenCreateParams.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 PersonTokenCreateParams.ScriptAddresses.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptAddresses.Kana#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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** 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; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + 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; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptAddresses.Kanji build() { + return new PersonTokenCreateParams.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** 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 PersonTokenCreateParams.ScriptAddresses.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptAddresses.Kanji#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; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptNames build() { + return new PersonTokenCreateParams.ScriptNames(this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.ScriptNames#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.ScriptNames#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Persons name in kana script. */ + public Builder setKana(PersonTokenCreateParams.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Persons name in kanji script. */ + public Builder setKanji(PersonTokenCreateParams.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kana(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptNames.Kana build() { + return new PersonTokenCreateParams.ScriptNames.Kana( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptNames.Kana#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 person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kanji(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptNames.Kanji build() { + return new PersonTokenCreateParams.ScriptNames.Kanji( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptNames.Kanji#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 person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + } + + public enum LegalGender implements ApiRequestParams.EnumParam { + @SerializedName("female") + FEMALE("female"), + + @SerializedName("male") + MALE("male"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LegalGender(String value) { + this.value = value; + } + } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java index ee996fdc0e0..93306020e7b 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java @@ -78,6 +78,10 @@ public class PersonUpdateParams extends ApiRequestParams { @SerializedName("nationalities") List nationalities; + /** The person token generated by the person token api. */ + @SerializedName("person_token") + Object personToken; + /** The phone number for this person. */ @SerializedName("phone") Object phone; @@ -116,6 +120,7 @@ private PersonUpdateParams( LegalGender legalGender, Map metadata, List nationalities, + Object personToken, Object phone, PoliticalExposure politicalExposure, Relationship relationship, @@ -135,6 +140,7 @@ private PersonUpdateParams( this.legalGender = legalGender; this.metadata = metadata; this.nationalities = nationalities; + this.personToken = personToken; this.phone = phone; this.politicalExposure = politicalExposure; this.relationship = relationship; @@ -174,6 +180,8 @@ public static class Builder { private List nationalities; + private Object personToken; + private Object phone; private PoliticalExposure politicalExposure; @@ -202,6 +210,7 @@ public PersonUpdateParams build() { this.legalGender, this.metadata, this.nationalities, + this.personToken, this.phone, this.politicalExposure, this.relationship, @@ -442,6 +451,18 @@ public Builder addAllNationality(List elements) { return this; } + /** The person token generated by the person token api. */ + public Builder setPersonToken(String personToken) { + this.personToken = personToken; + return this; + } + + /** The person token generated by the person token api. */ + public Builder setPersonToken(EmptyParam personToken) { + this.personToken = personToken; + return this; + } + /** The phone number for this person. */ public Builder setPhone(String phone) { this.phone = phone; @@ -2504,6 +2525,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ao_nif") AO_NIF("ao_nif"), + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + @SerializedName("az_tin") AZ_TIN("az_tin"), diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java index 2eed79ad4d9..917bc9f11ae 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java @@ -100,9 +100,6 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("gb_bank_account") GB_BANK_ACCOUNT("gb_bank_account"), - @SerializedName("sepa_bank_account") - SEPA_BANK_ACCOUNT("sepa_bank_account"), - @SerializedName("us_bank_account") US_BANK_ACCOUNT("us_bank_account"); diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java deleted file mode 100644 index 302f905d6b3..00000000000 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCaptureParams.java +++ /dev/null @@ -1,282 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.param.v2.payments; - -import com.google.gson.annotations.SerializedName; -import com.stripe.net.ApiRequestParams; -import java.util.HashMap; -import java.util.Map; -import lombok.EqualsAndHashCode; -import lombok.Getter; - -@Getter -@EqualsAndHashCode(callSuper = false) -public class OffSessionPaymentCaptureParams extends ApiRequestParams { - /** The amount to capture. */ - @SerializedName("amount_to_capture") - Long amountToCapture; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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. 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. Learn more about storing - * information in metadata. - */ - @SerializedName("metadata") - Map metadata; - - /** - * Text that appears on the customer’s statement as the statement descriptor for a non-card - * charge. This value overrides the account’s default statement descriptor. For information about - * requirements, including the 22-character limit, see the Statement Descriptor - * docs. - */ - @SerializedName("statement_descriptor") - String statementDescriptor; - - /** - * Provides information about a card charge. Concatenated to the account’s statement - * descriptor prefix to form the complete statement descriptor that appears on the customer’s - * statement. - */ - @SerializedName("statement_descriptor_suffix") - String statementDescriptorSuffix; - - /** - * The data that automatically creates a Transfer after the payment finalizes. Learn more about - * the use case for connected - * accounts. - */ - @SerializedName("transfer_data") - TransferData transferData; - - private OffSessionPaymentCaptureParams( - Long amountToCapture, - Map extraParams, - Map metadata, - String statementDescriptor, - String statementDescriptorSuffix, - TransferData transferData) { - this.amountToCapture = amountToCapture; - this.extraParams = extraParams; - this.metadata = metadata; - this.statementDescriptor = statementDescriptor; - this.statementDescriptorSuffix = statementDescriptorSuffix; - this.transferData = transferData; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Long amountToCapture; - - private Map extraParams; - - private Map metadata; - - private String statementDescriptor; - - private String statementDescriptorSuffix; - - private TransferData transferData; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCaptureParams build() { - return new OffSessionPaymentCaptureParams( - this.amountToCapture, - this.extraParams, - this.metadata, - this.statementDescriptor, - this.statementDescriptorSuffix, - this.transferData); - } - - /** The amount to capture. */ - public Builder setAmountToCapture(Long amountToCapture) { - this.amountToCapture = amountToCapture; - 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 - * OffSessionPaymentCaptureParams#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCaptureParams#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, - * and subsequent calls add additional key/value pairs to the original map. See {@link - * OffSessionPaymentCaptureParams#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 OffSessionPaymentCaptureParams#metadata} for the field documentation. - */ - public Builder putAllMetadata(Map map) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.putAll(map); - return this; - } - - /** - * Text that appears on the customer’s statement as the statement descriptor for a non-card - * charge. This value overrides the account’s default statement descriptor. For information - * about requirements, including the 22-character limit, see the Statement Descriptor - * docs. - */ - public Builder setStatementDescriptor(String statementDescriptor) { - this.statementDescriptor = statementDescriptor; - return this; - } - - /** - * Provides information about a card charge. Concatenated to the account’s statement - * descriptor prefix to form the complete statement descriptor that appears on the - * customer’s statement. - */ - public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { - this.statementDescriptorSuffix = statementDescriptorSuffix; - return this; - } - - /** - * The data that automatically creates a Transfer after the payment finalizes. Learn more about - * the use case for connected - * accounts. - */ - public Builder setTransferData(OffSessionPaymentCaptureParams.TransferData transferData) { - this.transferData = transferData; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class TransferData { - /** - * The amount transferred to the destination account. This transfer will occur automatically - * after the payment succeeds. If no amount is specified, by default the entire payment amount - * is transferred to the destination account. The amount must be less than or equal to the amount_requested, - * and must be a positive integer representing how much to transfer in the smallest currency - * unit (e.g., 100 cents to charge $1.00). - */ - @SerializedName("amount") - Long amount; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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 TransferData(Long amount, Map extraParams) { - this.amount = amount; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Long amount; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCaptureParams.TransferData build() { - return new OffSessionPaymentCaptureParams.TransferData(this.amount, this.extraParams); - } - - /** - * The amount transferred to the destination account. This transfer will occur automatically - * after the payment succeeds. If no amount is specified, by default the entire payment amount - * is transferred to the destination account. The amount must be less than or equal to the amount_requested, - * and must be a positive integer representing how much to transfer in the smallest currency - * unit (e.g., 100 cents to charge $1.00). - */ - public Builder setAmount(Long amount) { - this.amount = amount; - 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 - * OffSessionPaymentCaptureParams.TransferData#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCaptureParams.TransferData#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } -} diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java deleted file mode 100644 index 3d27c0e2172..00000000000 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ /dev/null @@ -1,882 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.param.v2.payments; - -import com.google.gson.annotations.SerializedName; -import com.stripe.net.ApiRequestParams; -import com.stripe.v2.Amount; -import java.util.HashMap; -import java.util.Map; -import lombok.EqualsAndHashCode; -import lombok.Getter; - -@Getter -@EqualsAndHashCode(callSuper = false) -public class OffSessionPaymentCreateParams extends ApiRequestParams { - /** Required. The “presentment amount” to be collected from the customer. */ - @SerializedName("amount") - Amount amount; - - /** Required. The frequency of the underlying payment. */ - @SerializedName("cadence") - Cadence cadence; - - /** Details about the capture configuration for the OffSessionPayment. */ - @SerializedName("capture") - Capture capture; - - /** Required. ID of the Customer to which this OffSessionPayment belongs. */ - @SerializedName("customer") - String customer; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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. 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. Learn more about storing - * information in metadata. - */ - @SerializedName("metadata") - Map metadata; - - /** The account (if any) for which the funds of the OffSessionPayment are intended. */ - @SerializedName("on_behalf_of") - String onBehalfOf; - - /** Required. ID of the payment method used in this OffSessionPayment. */ - @SerializedName("payment_method") - String paymentMethod; - - /** Payment method options for the off-session payment. */ - @SerializedName("payment_method_options") - PaymentMethodOptions paymentMethodOptions; - - /** Details about the payments orchestration configuration. */ - @SerializedName("payments_orchestration") - PaymentsOrchestration paymentsOrchestration; - - /** Details about the OffSessionPayment retries. */ - @SerializedName("retry_details") - RetryDetails retryDetails; - - /** - * Text that appears on the customer’s statement as the statement descriptor for a non-card - * charge. This value overrides the account’s default statement descriptor. For information about - * requirements, including the 22-character limit, see the Statement Descriptor - * docs. - */ - @SerializedName("statement_descriptor") - String statementDescriptor; - - /** - * Provides information about a card charge. Concatenated to the account’s statement - * descriptor prefix to form the complete statement descriptor that appears on the customer’s - * statement. - */ - @SerializedName("statement_descriptor_suffix") - String statementDescriptorSuffix; - - /** Test clock that can be used to advance the retry attempts in a sandbox. */ - @SerializedName("test_clock") - String testClock; - - /** - * The data that automatically creates a Transfer after the payment finalizes. Learn more about - * the use case for connected - * accounts. - */ - @SerializedName("transfer_data") - TransferData transferData; - - private OffSessionPaymentCreateParams( - Amount amount, - Cadence cadence, - Capture capture, - String customer, - Map extraParams, - Map metadata, - String onBehalfOf, - String paymentMethod, - PaymentMethodOptions paymentMethodOptions, - PaymentsOrchestration paymentsOrchestration, - RetryDetails retryDetails, - String statementDescriptor, - String statementDescriptorSuffix, - String testClock, - TransferData transferData) { - this.amount = amount; - this.cadence = cadence; - this.capture = capture; - this.customer = customer; - this.extraParams = extraParams; - this.metadata = metadata; - this.onBehalfOf = onBehalfOf; - this.paymentMethod = paymentMethod; - this.paymentMethodOptions = paymentMethodOptions; - this.paymentsOrchestration = paymentsOrchestration; - this.retryDetails = retryDetails; - this.statementDescriptor = statementDescriptor; - this.statementDescriptorSuffix = statementDescriptorSuffix; - this.testClock = testClock; - this.transferData = transferData; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Amount amount; - - private Cadence cadence; - - private Capture capture; - - private String customer; - - private Map extraParams; - - private Map metadata; - - private String onBehalfOf; - - private String paymentMethod; - - private PaymentMethodOptions paymentMethodOptions; - - private PaymentsOrchestration paymentsOrchestration; - - private RetryDetails retryDetails; - - private String statementDescriptor; - - private String statementDescriptorSuffix; - - private String testClock; - - private TransferData transferData; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams build() { - return new OffSessionPaymentCreateParams( - this.amount, - this.cadence, - this.capture, - this.customer, - this.extraParams, - this.metadata, - this.onBehalfOf, - this.paymentMethod, - this.paymentMethodOptions, - this.paymentsOrchestration, - this.retryDetails, - this.statementDescriptor, - this.statementDescriptorSuffix, - this.testClock, - this.transferData); - } - - /** Required. The “presentment amount” to be collected from the customer. */ - public Builder setAmount(Amount amount) { - this.amount = amount; - return this; - } - - /** Required. The frequency of the underlying payment. */ - public Builder setCadence(OffSessionPaymentCreateParams.Cadence cadence) { - this.cadence = cadence; - return this; - } - - /** Details about the capture configuration for the OffSessionPayment. */ - public Builder setCapture(OffSessionPaymentCreateParams.Capture capture) { - this.capture = capture; - return this; - } - - /** Required. ID of the Customer to which this OffSessionPayment belongs. */ - public Builder setCustomer(String customer) { - this.customer = customer; - 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 - * OffSessionPaymentCreateParams#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, - * and subsequent calls add additional key/value pairs to the original map. See {@link - * OffSessionPaymentCreateParams#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 OffSessionPaymentCreateParams#metadata} for the field documentation. - */ - public Builder putAllMetadata(Map map) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.putAll(map); - return this; - } - - /** The account (if any) for which the funds of the OffSessionPayment are intended. */ - public Builder setOnBehalfOf(String onBehalfOf) { - this.onBehalfOf = onBehalfOf; - return this; - } - - /** Required. ID of the payment method used in this OffSessionPayment. */ - public Builder setPaymentMethod(String paymentMethod) { - this.paymentMethod = paymentMethod; - return this; - } - - /** Payment method options for the off-session payment. */ - public Builder setPaymentMethodOptions( - OffSessionPaymentCreateParams.PaymentMethodOptions paymentMethodOptions) { - this.paymentMethodOptions = paymentMethodOptions; - return this; - } - - /** Details about the payments orchestration configuration. */ - public Builder setPaymentsOrchestration( - OffSessionPaymentCreateParams.PaymentsOrchestration paymentsOrchestration) { - this.paymentsOrchestration = paymentsOrchestration; - return this; - } - - /** Details about the OffSessionPayment retries. */ - public Builder setRetryDetails(OffSessionPaymentCreateParams.RetryDetails retryDetails) { - this.retryDetails = retryDetails; - return this; - } - - /** - * Text that appears on the customer’s statement as the statement descriptor for a non-card - * charge. This value overrides the account’s default statement descriptor. For information - * about requirements, including the 22-character limit, see the Statement Descriptor - * docs. - */ - public Builder setStatementDescriptor(String statementDescriptor) { - this.statementDescriptor = statementDescriptor; - return this; - } - - /** - * Provides information about a card charge. Concatenated to the account’s statement - * descriptor prefix to form the complete statement descriptor that appears on the - * customer’s statement. - */ - public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { - this.statementDescriptorSuffix = statementDescriptorSuffix; - return this; - } - - /** Test clock that can be used to advance the retry attempts in a sandbox. */ - public Builder setTestClock(String testClock) { - this.testClock = testClock; - return this; - } - - /** - * The data that automatically creates a Transfer after the payment finalizes. Learn more about - * the use case for connected - * accounts. - */ - public Builder setTransferData(OffSessionPaymentCreateParams.TransferData transferData) { - this.transferData = transferData; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Capture { - /** Required. The method to use to capture the payment. */ - @SerializedName("capture_method") - CaptureMethod captureMethod; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Capture(CaptureMethod captureMethod, Map extraParams) { - this.captureMethod = captureMethod; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private CaptureMethod captureMethod; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.Capture build() { - return new OffSessionPaymentCreateParams.Capture(this.captureMethod, this.extraParams); - } - - /** Required. The method to use to capture the payment. */ - public Builder setCaptureMethod( - OffSessionPaymentCreateParams.Capture.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OffSessionPaymentCreateParams.Capture#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams.Capture#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 CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("automatic") - AUTOMATIC("automatic"), - - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PaymentMethodOptions { - /** Payment method options for the card payment type. */ - @SerializedName("card") - Card card; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private PaymentMethodOptions(Card card, Map extraParams) { - this.card = card; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Card card; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.PaymentMethodOptions build() { - return new OffSessionPaymentCreateParams.PaymentMethodOptions(this.card, this.extraParams); - } - - /** Payment method options for the card payment type. */ - public Builder setCard(OffSessionPaymentCreateParams.PaymentMethodOptions.Card card) { - this.card = card; - 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 - * OffSessionPaymentCreateParams.PaymentMethodOptions#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams.PaymentMethodOptions#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Card { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * Required. If you are making a Credential On File transaction with a - * previously saved card, you should pass the Network Transaction ID from a prior initial - * authorization on Stripe (from a successful SetupIntent or a PaymentIntent with {@code - * setup_future_usage} set), or one that you have obtained from another payment processor. - * This is a token from the network which uniquely identifies the transaction. Visa calls this - * the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. Note that you should pass in a Network Transaction ID if you have - * one, regardless of whether this is a Customer-Initiated Transaction (CIT) or a - * Merchant-Initiated Transaction (MIT). - */ - @SerializedName("network_transaction_id") - String networkTransactionId; - - private Card(Map extraParams, String networkTransactionId) { - this.extraParams = extraParams; - this.networkTransactionId = networkTransactionId; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private String networkTransactionId; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.PaymentMethodOptions.Card build() { - return new OffSessionPaymentCreateParams.PaymentMethodOptions.Card( - this.extraParams, this.networkTransactionId); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link OffSessionPaymentCreateParams.PaymentMethodOptions.Card#extraParams} for - * the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link OffSessionPaymentCreateParams.PaymentMethodOptions.Card#extraParams} for - * the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Required. If you are making a Credential On File transaction with a - * previously saved card, you should pass the Network Transaction ID from a prior initial - * authorization on Stripe (from a successful SetupIntent or a PaymentIntent with {@code - * setup_future_usage} set), or one that you have obtained from another payment processor. - * This is a token from the network which uniquely identifies the transaction. Visa calls - * this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls - * this the Acquirer Reference Data. Note that you should pass in a Network Transaction ID - * if you have one, regardless of whether this is a Customer-Initiated Transaction (CIT) or - * a Merchant-Initiated Transaction (MIT). - */ - public Builder setNetworkTransactionId(String networkTransactionId) { - this.networkTransactionId = networkTransactionId; - return this; - } - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PaymentsOrchestration { - /** - * Required. True when you want to enable payments orchestration for this - * off-session payment. False otherwise. - */ - @SerializedName("enabled") - Boolean enabled; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private PaymentsOrchestration(Boolean enabled, Map extraParams) { - this.enabled = enabled; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Boolean enabled; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.PaymentsOrchestration build() { - return new OffSessionPaymentCreateParams.PaymentsOrchestration( - this.enabled, this.extraParams); - } - - /** - * Required. True when you want to enable payments orchestration for this - * off-session payment. False otherwise. - */ - public Builder setEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OffSessionPaymentCreateParams.PaymentsOrchestration#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams.PaymentsOrchestration#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 - @EqualsAndHashCode(callSuper = false) - public static class RetryDetails { - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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 pre-configured retry policy to use for the payment. */ - @SerializedName("retry_policy") - String retryPolicy; - - /** Indicates the strategy for how you want Stripe to retry the payment. */ - @SerializedName("retry_strategy") - RetryStrategy retryStrategy; - - private RetryDetails( - Map extraParams, String retryPolicy, RetryStrategy retryStrategy) { - this.extraParams = extraParams; - this.retryPolicy = retryPolicy; - this.retryStrategy = retryStrategy; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private String retryPolicy; - - private RetryStrategy retryStrategy; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.RetryDetails build() { - return new OffSessionPaymentCreateParams.RetryDetails( - this.extraParams, this.retryPolicy, this.retryStrategy); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OffSessionPaymentCreateParams.RetryDetails#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams.RetryDetails#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 pre-configured retry policy to use for the payment. */ - public Builder setRetryPolicy(String retryPolicy) { - this.retryPolicy = retryPolicy; - return this; - } - - /** Indicates the strategy for how you want Stripe to retry the payment. */ - public Builder setRetryStrategy( - OffSessionPaymentCreateParams.RetryDetails.RetryStrategy retryStrategy) { - this.retryStrategy = retryStrategy; - return this; - } - } - - public enum RetryStrategy implements ApiRequestParams.EnumParam { - @SerializedName("best_available") - BEST_AVAILABLE("best_available"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - RetryStrategy(String value) { - this.value = value; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class TransferData { - /** - * The amount transferred to the destination account. This transfer will occur automatically - * after the payment succeeds. If no amount is specified, by default the entire payment amount - * is transferred to the destination account. The amount must be less than or equal to the amount_requested, - * and must be a positive integer representing how much to transfer in the smallest currency - * unit (e.g., 100 cents to charge $1.00). - */ - @SerializedName("amount") - Long amount; - - /** - * Required. The account (if any) that the payment is attributed to for tax - * reporting, and where funds from the payment are transferred to after payment success. - */ - @SerializedName("destination") - String destination; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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 TransferData(Long amount, String destination, Map extraParams) { - this.amount = amount; - this.destination = destination; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Long amount; - - private String destination; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentCreateParams.TransferData build() { - return new OffSessionPaymentCreateParams.TransferData( - this.amount, this.destination, this.extraParams); - } - - /** - * The amount transferred to the destination account. This transfer will occur automatically - * after the payment succeeds. If no amount is specified, by default the entire payment amount - * is transferred to the destination account. The amount must be less than or equal to the amount_requested, - * and must be a positive integer representing how much to transfer in the smallest currency - * unit (e.g., 100 cents to charge $1.00). - */ - public Builder setAmount(Long amount) { - this.amount = amount; - return this; - } - - /** - * Required. The account (if any) that the payment is attributed to for tax - * reporting, and where funds from the payment are transferred to after payment success. - */ - public Builder setDestination(String destination) { - this.destination = destination; - 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 - * OffSessionPaymentCreateParams.TransferData#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentCreateParams.TransferData#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 Cadence implements ApiRequestParams.EnumParam { - @SerializedName("recurring") - RECURRING("recurring"), - - @SerializedName("unscheduled") - UNSCHEDULED("unscheduled"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - Cadence(String value) { - this.value = value; - } - } -} diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentListParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentListParams.java deleted file mode 100644 index 1ac7a81f472..00000000000 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentListParams.java +++ /dev/null @@ -1,78 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.param.v2.payments; - -import com.google.gson.annotations.SerializedName; -import com.stripe.net.ApiRequestParams; -import java.util.HashMap; -import java.util.Map; -import lombok.EqualsAndHashCode; -import lombok.Getter; - -@Getter -@EqualsAndHashCode(callSuper = false) -public class OffSessionPaymentListParams extends ApiRequestParams { - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** The page size limit. If not provided, the default is 20. */ - @SerializedName("limit") - Long limit; - - private OffSessionPaymentListParams(Map extraParams, Long limit) { - this.extraParams = extraParams; - this.limit = limit; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private Long limit; - - /** Finalize and obtain parameter instance from this builder. */ - public OffSessionPaymentListParams build() { - return new OffSessionPaymentListParams(this.extraParams, this.limit); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OffSessionPaymentListParams#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OffSessionPaymentListParams#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 page size limit. If not provided, the default is 20. */ - public Builder setLimit(Long limit) { - this.limit = limit; - return this; - } - } -} diff --git a/src/main/java/com/stripe/service/V2Services.java b/src/main/java/com/stripe/service/V2Services.java index 92b6ee128b4..5a6b65a5334 100644 --- a/src/main/java/com/stripe/service/V2Services.java +++ b/src/main/java/com/stripe/service/V2Services.java @@ -21,10 +21,6 @@ public com.stripe.service.v2.MoneyManagementService moneyManagement() { return new com.stripe.service.v2.MoneyManagementService(this.getResponseGetter()); } - public com.stripe.service.v2.PaymentService payments() { - return new com.stripe.service.v2.PaymentService(this.getResponseGetter()); - } - public com.stripe.service.v2.TestHelperService testHelpers() { return new com.stripe.service.v2.TestHelperService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/v2/CoreService.java b/src/main/java/com/stripe/service/v2/CoreService.java index df2a5b76410..8e1990f3696 100644 --- a/src/main/java/com/stripe/service/v2/CoreService.java +++ b/src/main/java/com/stripe/service/v2/CoreService.java @@ -13,6 +13,10 @@ public com.stripe.service.v2.core.AccountLinkService accountLinks() { return new com.stripe.service.v2.core.AccountLinkService(this.getResponseGetter()); } + public com.stripe.service.v2.core.AccountTokenService accountTokens() { + return new com.stripe.service.v2.core.AccountTokenService(this.getResponseGetter()); + } + public com.stripe.service.v2.core.AccountService accounts() { return new com.stripe.service.v2.core.AccountService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/v2/PaymentService.java b/src/main/java/com/stripe/service/v2/PaymentService.java deleted file mode 100644 index 28d12615a13..00000000000 --- a/src/main/java/com/stripe/service/v2/PaymentService.java +++ /dev/null @@ -1,15 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.service.v2; - -import com.stripe.net.ApiService; -import com.stripe.net.StripeResponseGetter; - -public final class PaymentService extends ApiService { - public PaymentService(StripeResponseGetter responseGetter) { - super(responseGetter); - } - - public com.stripe.service.v2.payments.OffSessionPaymentService offSessionPayments() { - return new com.stripe.service.v2.payments.OffSessionPaymentService(this.getResponseGetter()); - } -} diff --git a/src/main/java/com/stripe/service/v2/core/AccountService.java b/src/main/java/com/stripe/service/v2/core/AccountService.java index 3e503c30cb3..a0ba9d38115 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountService.java @@ -189,6 +189,10 @@ public Account close(String id, AccountCloseParams params, RequestOptions option return this.request(request, Account.class); } + public com.stripe.service.v2.core.accounts.PersonTokenService personTokens() { + return new com.stripe.service.v2.core.accounts.PersonTokenService(this.getResponseGetter()); + } + public com.stripe.service.v2.core.accounts.PersonService persons() { return new com.stripe.service.v2.core.accounts.PersonService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/v2/core/AccountTokenService.java b/src/main/java/com/stripe/service/v2/core/AccountTokenService.java new file mode 100644 index 00000000000..e1041147d39 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/AccountTokenService.java @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountToken; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.AccountTokenCreateParams; + +public final class AccountTokenService extends ApiService { + public AccountTokenService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Creates an Account Token. */ + public AccountToken create(AccountTokenCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** Creates an Account Token. */ + public AccountToken create(AccountTokenCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/core/account_tokens"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountToken.class); + } + /** Retrieves an Account Token. */ + public AccountToken retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves an Account Token. */ + public AccountToken retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/account_tokens/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, AccountToken.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java new file mode 100644 index 00000000000..4325a3193ec --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java @@ -0,0 +1,64 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core.accounts; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPersonToken; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.accounts.PersonTokenCreateParams; + +public final class PersonTokenService extends ApiService { + public PersonTokenService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Creates a Person Token associated with an Account. */ + public AccountPersonToken create(String accountId, PersonTokenCreateParams params) + throws StripeException { + return create(accountId, params, (RequestOptions) null); + } + /** Creates a Person Token associated with an Account. */ + public AccountPersonToken create(String accountId, RequestOptions options) + throws StripeException { + return create(accountId, (PersonTokenCreateParams) null, options); + } + /** Creates a Person Token associated with an Account. */ + public AccountPersonToken create(String accountId) throws StripeException { + return create(accountId, (PersonTokenCreateParams) null, (RequestOptions) null); + } + /** Creates a Person Token associated with an Account. */ + public AccountPersonToken create( + String accountId, PersonTokenCreateParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v2/core/accounts/%s/person_tokens", ApiResource.urlEncodeId(accountId)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountPersonToken.class); + } + /** Retrieves a Person Token associated with an Account. */ + public AccountPersonToken retrieve(String accountId, String id) throws StripeException { + return retrieve(accountId, id, (RequestOptions) null); + } + /** Retrieves a Person Token associated with an Account. */ + public AccountPersonToken retrieve(String accountId, String id, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/core/accounts/%s/person_tokens/%s", + ApiResource.urlEncodeId(accountId), ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, AccountPersonToken.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/payments/OffSessionPaymentService.java b/src/main/java/com/stripe/service/v2/payments/OffSessionPaymentService.java deleted file mode 100644 index 52d5dad7277..00000000000 --- a/src/main/java/com/stripe/service/v2/payments/OffSessionPaymentService.java +++ /dev/null @@ -1,111 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.service.v2.payments; - -import com.google.gson.reflect.TypeToken; -import com.stripe.exception.StripeException; -import com.stripe.model.v2.StripeCollection; -import com.stripe.model.v2.payments.OffSessionPayment; -import com.stripe.net.ApiRequest; -import com.stripe.net.ApiRequestParams; -import com.stripe.net.ApiResource; -import com.stripe.net.ApiService; -import com.stripe.net.BaseAddress; -import com.stripe.net.RequestOptions; -import com.stripe.net.StripeResponseGetter; -import com.stripe.param.v2.payments.OffSessionPaymentCaptureParams; -import com.stripe.param.v2.payments.OffSessionPaymentCreateParams; -import com.stripe.param.v2.payments.OffSessionPaymentListParams; - -public final class OffSessionPaymentService extends ApiService { - public OffSessionPaymentService(StripeResponseGetter responseGetter) { - super(responseGetter); - } - - /** Returns a list of OffSessionPayments matching a filter. */ - public StripeCollection list(OffSessionPaymentListParams params) - throws StripeException { - return list(params, (RequestOptions) null); - } - /** Returns a list of OffSessionPayments matching a filter. */ - public StripeCollection list(RequestOptions options) throws StripeException { - return list((OffSessionPaymentListParams) null, options); - } - /** Returns a list of OffSessionPayments matching a filter. */ - public StripeCollection list() throws StripeException { - return list((OffSessionPaymentListParams) null, (RequestOptions) null); - } - /** Returns a list of OffSessionPayments matching a filter. */ - public StripeCollection list( - OffSessionPaymentListParams params, RequestOptions options) throws StripeException { - String path = "/v2/payments/off_session_payments"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, new TypeToken>() {}.getType()); - } - /** Creates an OffSessionPayment object. */ - public OffSessionPayment create(OffSessionPaymentCreateParams params) throws StripeException { - return create(params, (RequestOptions) null); - } - /** Creates an OffSessionPayment object. */ - public OffSessionPayment create(OffSessionPaymentCreateParams params, RequestOptions options) - throws StripeException { - String path = "/v2/payments/off_session_payments"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, OffSessionPayment.class); - } - /** Retrieves the details of an OffSessionPayment that has previously been created. */ - public OffSessionPayment retrieve(String id) throws StripeException { - return retrieve(id, (RequestOptions) null); - } - /** Retrieves the details of an OffSessionPayment that has previously been created. */ - public OffSessionPayment retrieve(String id, RequestOptions options) throws StripeException { - String path = - String.format("/v2/payments/off_session_payments/%s", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); - return this.request(request, OffSessionPayment.class); - } - /** Cancel an OffSessionPayment that has previously been created. */ - public OffSessionPayment cancel(String id) throws StripeException { - return cancel(id, (RequestOptions) null); - } - /** Cancel an OffSessionPayment that has previously been created. */ - public OffSessionPayment cancel(String id, RequestOptions options) throws StripeException { - String path = - String.format("/v2/payments/off_session_payments/%s/cancel", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, OffSessionPayment.class); - } - /** Captures an OffSessionPayment that has previously been created. */ - public OffSessionPayment capture(String id, OffSessionPaymentCaptureParams params) - throws StripeException { - return capture(id, params, (RequestOptions) null); - } - /** Captures an OffSessionPayment that has previously been created. */ - public OffSessionPayment capture( - String id, OffSessionPaymentCaptureParams params, RequestOptions options) - throws StripeException { - String path = - String.format("/v2/payments/off_session_payments/%s/capture", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, OffSessionPayment.class); - } -} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index a75933e4fe4..ef3d3612cca 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3208,7 +3208,7 @@ public void testCoreEventsGetServices() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); + "{\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("ll_123"); @@ -25388,6 +25388,55 @@ public void testV2CoreAccountsPersonPost2Services() throws StripeException { null); } + @Test + public void testV2CoreAccountsPersonTokenPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/account_id_123/person_tokens", + null, + null, + com.stripe.model.v2.core.AccountPersonToken.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_person_token\",\"used\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.accounts.PersonTokenCreateParams params = + com.stripe.param.v2.core.accounts.PersonTokenCreateParams.builder().build(); + + com.stripe.model.v2.core.AccountPersonToken accountPersonToken = + client.v2().core().accounts().personTokens().create("account_id_123", params); + assertNotNull(accountPersonToken); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/account_id_123/person_tokens", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountsPersonTokenGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/person_tokens/id_123", + null, + null, + com.stripe.model.v2.core.AccountPersonToken.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_person_token\",\"used\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.AccountPersonToken accountPersonToken = + client.v2().core().accounts().personTokens().retrieve("account_id_123", "id_123"); + assertNotNull(accountPersonToken); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/person_tokens/id_123", + null, + null); + } + @Test public void testV2CoreAccountLinkPostServices() throws StripeException { stubRequest( @@ -25463,6 +25512,470 @@ public void testV2CoreAccountLinkPostServices() throws StripeException { null); } + @Test + public void testV2CoreAccountTokenPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/account_tokens", + null, + null, + com.stripe.model.v2.core.AccountToken.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_token\",\"used\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountTokenCreateParams params = + com.stripe.param.v2.core.AccountTokenCreateParams.builder() + .setIdentity( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity.builder() + .setAttestations( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity.Attestations + .builder() + .setDirectorshipDeclaration( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Attestations.DirectorshipDeclaration.builder() + .setAttested(true) + .build()) + .setOwnershipDeclaration( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Attestations.OwnershipDeclaration.builder() + .setAttested(true) + .build()) + .setPersonsProvided( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Attestations.PersonsProvided.builder() + .setDirectors(true) + .setExecutives(true) + .setOwners(true) + .setOwnershipExemptionReason( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Attestations.PersonsProvided.OwnershipExemptionReason + .QUALIFIED_ENTITY_EXCEEDS_OWNERSHIP_THRESHOLD) + .build()) + .setRepresentativeDeclaration( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Attestations.RepresentativeDeclaration.builder() + .setAttested(true) + .build()) + .setTermsOfService( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Attestations.TermsOfService.builder() + .setAccount( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Attestations.TermsOfService.Account.builder() + .setShownAndAccepted(true) + .build()) + .setStorer( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Attestations.TermsOfService.Storer.builder() + .setShownAndAccepted(true) + .build()) + .build()) + .build()) + .setBusinessDetails( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity.BusinessDetails + .builder() + .setAddress( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Address.builder() + .setCity("city") + .setCountry("country") + .setLine1("line1") + .setLine2("line2") + .setPostalCode("postal_code") + .setState("state") + .setTown("town") + .build()) + .setAnnualRevenue( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.AnnualRevenue.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setFiscalYearEnd("fiscal_year_end") + .build()) + .setDocuments( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents.builder() + .setBankAccountOwnershipVerification( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents + .BankAccountOwnershipVerification.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification.Type.FILES) + .build()) + .setCompanyLicense( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents.CompanyLicense.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .CompanyLicense.Type.FILES) + .build()) + .setCompanyMemorandumOfAssociation( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents + .CompanyMemorandumOfAssociation.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation.Type.FILES) + .build()) + .setCompanyMinisterialDecree( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents.CompanyMinisterialDecree + .builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .CompanyMinisterialDecree.Type.FILES) + .build()) + .setCompanyRegistrationVerification( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents + .CompanyRegistrationVerification.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .CompanyRegistrationVerification.Type.FILES) + .build()) + .setCompanyTaxIdVerification( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents.CompanyTaxIdVerification + .builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .CompanyTaxIdVerification.Type.FILES) + .build()) + .setPrimaryVerification( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents.PrimaryVerification.builder() + .setFrontBack( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .PrimaryVerification.FrontBack.builder() + .setBack("back") + .setFront("front") + .build()) + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .PrimaryVerification.Type.FRONT_BACK) + .build()) + .setProofOfAddress( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents.ProofOfAddress.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .ProofOfAddress.Type.FILES) + .build()) + .setProofOfRegistration( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents.ProofOfRegistration.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .ProofOfRegistration.Type.FILES) + .build()) + .setProofOfUltimateBeneficialOwnership( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership.Type.FILES) + .build()) + .build()) + .setEstimatedWorkerCount(884794319L) + .addIdNumber( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.IdNumber.builder() + .setRegistrar("registrar") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.IdNumber.Type.TH_PRN) + .setValue("value") + .build()) + .setMonthlyEstimatedRevenue( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.MonthlyEstimatedRevenue.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .build()) + .setPhone("phone") + .setRegisteredName("registered_name") + .setScriptAddresses( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.ScriptAddresses.builder() + .setKana( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.ScriptAddresses.Kana.builder() + .setCity("city") + .setCountry("country") + .setLine1("line1") + .setLine2("line2") + .setPostalCode("postal_code") + .setState("state") + .setTown("town") + .build()) + .setKanji( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.ScriptAddresses.Kanji.builder() + .setCity("city") + .setCountry("country") + .setLine1("line1") + .setLine2("line2") + .setPostalCode("postal_code") + .setState("state") + .setTown("town") + .build()) + .build()) + .setScriptNames( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.ScriptNames.builder() + .setKana( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.ScriptNames.Kana.builder() + .setRegisteredName("registered_name") + .build()) + .setKanji( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.ScriptNames.Kanji.builder() + .setRegisteredName("registered_name") + .build()) + .build()) + .setStructure( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .BusinessDetails.Structure.PUBLIC_LISTED_CORPORATION) + .build()) + .setEntityType( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity.EntityType + .INDIVIDUAL) + .setIndividual( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity.Individual + .builder() + .addAdditionalAddress( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.AdditionalAddress.builder() + .setCity("city") + .setCountry("country") + .setLine1("line1") + .setLine2("line2") + .setPostalCode("postal_code") + .setPurpose( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.AdditionalAddress.Purpose.REGISTERED) + .setState("state") + .setTown("town") + .build()) + .addAdditionalName( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.AdditionalName.builder() + .setFullName("full_name") + .setGivenName("given_name") + .setPurpose( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.AdditionalName.Purpose.ALIAS) + .setSurname("surname") + .build()) + .setAddress( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.Address.builder() + .setCity("city") + .setCountry("country") + .setLine1("line1") + .setLine2("line2") + .setPostalCode("postal_code") + .setState("state") + .setTown("town") + .build()) + .setDateOfBirth( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.DateOfBirth.builder() + .setDay(99228L) + .setMonth(104080000L) + .setYear(3704893L) + .build()) + .setDocuments( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.Documents.builder() + .setCompanyAuthorization( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.Documents.CompanyAuthorization.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.Individual.Documents + .CompanyAuthorization.Type.FILES) + .build()) + .setPassport( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.Documents.Passport.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.Individual.Documents.Passport.Type + .FILES) + .build()) + .setPrimaryVerification( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.Documents.PrimaryVerification.builder() + .setFrontBack( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.Individual.Documents + .PrimaryVerification.FrontBack.builder() + .setBack("back") + .setFront("front") + .build()) + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.Individual.Documents + .PrimaryVerification.Type.FRONT_BACK) + .build()) + .setSecondaryVerification( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.Documents.SecondaryVerification.builder() + .setFrontBack( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.Individual.Documents + .SecondaryVerification.FrontBack.builder() + .setBack("back") + .setFront("front") + .build()) + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.Individual.Documents + .SecondaryVerification.Type.FRONT_BACK) + .build()) + .setVisa( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.Documents.Visa.builder() + .addFile("files") + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams + .Identity.Individual.Documents.Visa.Type.FILES) + .build()) + .build()) + .setEmail("email") + .setGivenName("given_name") + .addIdNumber( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.IdNumber.builder() + .setType( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.IdNumber.Type.TH_LC) + .setValue("value") + .build()) + .setLegalGender( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.LegalGender.MALE) + .putMetadata("key", "metadata") + .addNationality("nationalities") + .setPhone("phone") + .setPoliticalExposure( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.PoliticalExposure.NONE) + .setRelationship( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.Relationship.builder() + .setDirector(true) + .setExecutive(true) + .setOwner(true) + .setPercentOwnership("percent_ownership") + .setTitle("title") + .build()) + .setScriptAddresses( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.ScriptAddresses.builder() + .setKana( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.ScriptAddresses.Kana.builder() + .setCity("city") + .setCountry("country") + .setLine1("line1") + .setLine2("line2") + .setPostalCode("postal_code") + .setState("state") + .setTown("town") + .build()) + .setKanji( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.ScriptAddresses.Kanji.builder() + .setCity("city") + .setCountry("country") + .setLine1("line1") + .setLine2("line2") + .setPostalCode("postal_code") + .setState("state") + .setTown("town") + .build()) + .build()) + .setScriptNames( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.ScriptNames.builder() + .setKana( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.ScriptNames.Kana.builder() + .setGivenName("given_name") + .setSurname("surname") + .build()) + .setKanji( + com.stripe.param.v2.core.AccountTokenCreateParams.Identity + .Individual.ScriptNames.Kanji.builder() + .setGivenName("given_name") + .setSurname("surname") + .build()) + .build()) + .setSurname("surname") + .build()) + .build()) + .build(); + + com.stripe.model.v2.core.AccountToken accountToken = + client.v2().core().accountTokens().create(params); + assertNotNull(accountToken); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/account_tokens", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountTokenGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/account_tokens/id_123", + null, + null, + com.stripe.model.v2.core.AccountToken.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_token\",\"used\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.AccountToken accountToken = + client.v2().core().accountTokens().retrieve("id_123"); + assertNotNull(accountToken); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/account_tokens/id_123", + null, + null); + } + @Test public void testV2CoreEventGetServices() throws StripeException { stubRequest( @@ -27135,141 +27648,6 @@ public void testV2MoneyManagementTransactionEntryGet2Services() throws StripeExc null); } - @Test - public void testV2PaymentsOffSessionPaymentGetServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/payments/off_session_payments", - null, - null, - new TypeToken< - com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.payments.OffSessionPayment>>() {}.getType(), - "{\"data\":[{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.payments.OffSessionPaymentListParams params = - com.stripe.param.v2.payments.OffSessionPaymentListParams.builder().build(); - - com.stripe.model.v2.StripeCollection - stripeCollection = client.v2().payments().offSessionPayments().list(params); - assertNotNull(stripeCollection); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/payments/off_session_payments", - params.toMap(), - null); - } - - @Test - public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/payments/off_session_payments", - null, - null, - com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.payments.OffSessionPaymentCreateParams params = - com.stripe.param.v2.payments.OffSessionPaymentCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) - .setCadence( - com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Cadence.UNSCHEDULED) - .setCustomer("customer") - .putMetadata("key", "metadata") - .setPaymentMethod("payment_method") - .build(); - - com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = - client.v2().payments().offSessionPayments().create(params); - assertNotNull(offSessionPayment); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/payments/off_session_payments", - params.toMap(), - null); - } - - @Test - public void testV2PaymentsOffSessionPaymentGet2Services() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/payments/off_session_payments/id_123", - null, - null, - com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = - client.v2().payments().offSessionPayments().retrieve("id_123"); - assertNotNull(offSessionPayment); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/payments/off_session_payments/id_123", - null, - null); - } - - @Test - public void testV2PaymentsOffSessionPaymentPost2Services() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/payments/off_session_payments/id_123/cancel", - null, - null, - com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = - client.v2().payments().offSessionPayments().cancel("id_123"); - assertNotNull(offSessionPayment); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/payments/off_session_payments/id_123/cancel", - null, - null); - } - - @Test - public void testV2PaymentsOffSessionPaymentPost3Services() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/payments/off_session_payments/id_123/capture", - null, - null, - com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.payments.OffSessionPaymentCaptureParams params = - com.stripe.param.v2.payments.OffSessionPaymentCaptureParams.builder() - .putMetadata("key", "metadata") - .build(); - - com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = - client.v2().payments().offSessionPayments().capture("id_123", params); - assertNotNull(offSessionPayment); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/payments/off_session_payments/id_123/capture", - params.toMap(), - null); - } - @Test public void testV2TestHelpersFinancialAddressPostServices() throws StripeException { stubRequest( From 067b6f6d7f3e4503c7331c2f408e9ce381addeeb Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 15 Nov 2025 02:20:43 +0000 Subject: [PATCH 13/17] Update generated code for v2123 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/financialconnections/Account.java | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/API_VERSION b/API_VERSION index e0ecaaa28eb..2f15c36285b 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -f587035a62fe3323ed42077a0526158e57a8260b \ No newline at end of file +a4d4c803dcbf205368dc65179c7eca4748aadaf7 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 559abffe4b5..e67a81ed1b3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2121 \ No newline at end of file +v2123 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/financialconnections/Account.java b/src/main/java/com/stripe/model/financialconnections/Account.java index 16655cc3a85..028c6e63055 100644 --- a/src/main/java/com/stripe/model/financialconnections/Account.java +++ b/src/main/java/com/stripe/model/financialconnections/Account.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; -import com.stripe.model.Account; import com.stripe.model.Customer; import com.stripe.model.ExpandableField; import com.stripe.model.HasId; From 0931ee35f698226252173e60747487a83d220c29 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 15 Nov 2025 02:25:14 +0000 Subject: [PATCH 14/17] Update generated code (#2108) * Update generated code for v2113 and * Update generated code for v2114 and * Update generated code for v2117 and * Update generated code for v2121 and * Update generated code for v2123 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- .../java/com/stripe/model/BankAccount.java | 26 +- src/main/java/com/stripe/model/Charge.java | 16 +- .../com/stripe/model/ConfirmationToken.java | 16 +- src/main/java/com/stripe/model/Event.java | 2 + .../stripe/model/EventDataClassLookup.java | 2 + .../stripe/model/PaymentAttemptRecord.java | 36 +- .../java/com/stripe/model/PaymentIntent.java | 41 +++ .../java/com/stripe/model/PaymentMethod.java | 15 +- .../java/com/stripe/model/PaymentRecord.java | 36 +- src/main/java/com/stripe/model/Refund.java | 35 ++ .../java/com/stripe/model/SetupAttempt.java | 12 +- .../model/billingportal/Configuration.java | 9 + .../model/financialconnections/Account.java | 37 ++ .../java/com/stripe/model/issuing/Card.java | 32 ++ .../com/stripe/model/tax/Association.java | 147 ++++++++ .../stripe/model/terminal/OnboardingLink.java | 122 +++++++ .../java/com/stripe/model/v2/core/Event.java | 5 + .../param/ConfirmationTokenCreateParams.java | 3 + ...alanceTransactionCollectionListParams.java | 142 +++++++- .../CustomerBalanceTransactionListParams.java | 141 +++++++- .../CustomerBalanceTransactionsParams.java | 141 +++++++- .../param/InvoicePaymentListParams.java | 130 +++++++ .../param/PaymentIntentCaptureParams.java | 243 +++++++++++++ .../param/PaymentIntentConfirmParams.java | 246 +++++++++++++ .../param/PaymentIntentCreateParams.java | 246 +++++++++++++ ...entIntentIncrementAuthorizationParams.java | 245 +++++++++++++ .../param/PaymentIntentUpdateParams.java | 246 +++++++++++++ .../param/PaymentMethodCreateParams.java | 3 + .../param/SetupIntentConfirmParams.java | 3 + .../stripe/param/SetupIntentCreateParams.java | 3 + .../stripe/param/SetupIntentUpdateParams.java | 3 + .../param/WebhookEndpointCreateParams.java | 13 +- .../param/WebhookEndpointUpdateParams.java | 8 + .../issuing/AuthorizationCreateParams.java | 142 +++++++- .../param/tax/AssociationFindParams.java | 120 +++++++ .../param/tax/RegistrationCreateParams.java | 14 +- .../terminal/OnboardingLinkCreateParams.java | 323 ++++++++++++++++++ .../java/com/stripe/service/TaxService.java | 4 + .../com/stripe/service/TerminalService.java | 4 + .../service/tax/AssociationService.java | 37 ++ .../terminal/OnboardingLinkService.java | 43 +++ .../stripe/functional/GeneratedExamples.java | 2 +- 45 files changed, 3028 insertions(+), 72 deletions(-) create mode 100644 src/main/java/com/stripe/model/tax/Association.java create mode 100644 src/main/java/com/stripe/model/terminal/OnboardingLink.java create mode 100644 src/main/java/com/stripe/param/tax/AssociationFindParams.java create mode 100644 src/main/java/com/stripe/param/terminal/OnboardingLinkCreateParams.java create mode 100644 src/main/java/com/stripe/service/tax/AssociationService.java create mode 100644 src/main/java/com/stripe/service/terminal/OnboardingLinkService.java diff --git a/API_VERSION b/API_VERSION index dffa3a76a26..2f15c36285b 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -6d15a7f20cb77c2c22091a30e499cb89d7e3248c \ No newline at end of file +a4d4c803dcbf205368dc65179c7eca4748aadaf7 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dfd2783f161..e67a81ed1b3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2111 \ No newline at end of file +v2123 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index 933e22b0b18..ce6a6ab331b 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,6 +2,6 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-10-29.clover"; + public static final String CURRENT = "2025-11-17.clover"; public static final String CURRENT_MAJOR = "clover"; } diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index 5284ebe11fe..88c9e47a664 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -156,20 +156,24 @@ public class BankAccount extends ApiResource /** * For bank accounts, possible values are {@code new}, {@code validated}, {@code verified}, {@code - * verification_failed}, or {@code errored}. A bank account that hasn't had any activity or - * validation performed is {@code new}. If Stripe can determine that the bank account exists, its - * status will be {@code validated}. Note that there often isn’t enough information to know (e.g., - * for smaller credit unions), and the validation is not always run. If customer bank account - * verification has succeeded, the bank account status will be {@code verified}. If the - * verification failed for any reason, such as microdeposit failure, the status will be {@code - * verification_failed}. If a payout sent to this bank account fails, we'll set the status to - * {@code errored} and will not continue to send scheduled payouts until the bank * details are updated. * - *

For external accounts, possible values are {@code new}, {@code errored} and {@code - * verification_failed}. If a payout fails, the status is set to {@code errored} and scheduled - * payouts are stopped until account details are updated. In the US and India, if we can't For external accounts, possible values are {@code new}, {@code errored}, {@code + * verification_failed}, and {@code tokenized_account_number_deactivated}. If a payout fails, the + * status is set to {@code errored} and scheduled payouts are stopped until account details are + * updated. In the US and India, if we can't verify the * owner of the bank account, we'll set the status to {@code verification_failed}. Other * validations aren't run against external accounts because they're only used for payouts. This diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index c5c6e994c56..61efdda9ce5 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2831,9 +2831,9 @@ public static class Grabpay extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2842,9 +2842,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2865,6 +2865,10 @@ public static class Ideal extends StripeObject { @SerializedName("iban_last4") String ibanLast4; + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + /** * Owner's verified full name. Values are verified or provided by iDEAL directly (if * supported) at the time of authorization or settlement. They cannot be set or mutated. diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 8af3bf46de1..584558a4af0 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -1665,9 +1665,10 @@ public static class Grabpay extends StripeObject {} public static class Ideal extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, - * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code - * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, + * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code + * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code + * yoursafe}. */ @SerializedName("bank") String bank; @@ -1676,9 +1677,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank, if the bank was provided. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2351,7 +2352,8 @@ public static class Blocked extends StripeObject { * *

One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code * bank_account_invalid_details}, {@code bank_account_restricted}, {@code - * bank_account_unusable}, or {@code debit_not_authorized}. + * bank_account_unusable}, {@code debit_not_authorized}, or {@code + * tokenized_account_number_deactivated}. */ @SerializedName("reason") String reason; diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index 8f0b0911e4e..1f36c7d8289 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -129,12 +129,14 @@ public class Event extends ApiResource implements HasId { * customer.tax_id.created}, {@code customer.tax_id.deleted}, {@code customer.tax_id.updated}, * {@code customer.updated}, {@code customer_cash_balance_transaction.created}, {@code * entitlements.active_entitlement_summary.updated}, {@code file.created}, {@code + * financial_connections.account.account_numbers_updated}, {@code * financial_connections.account.created}, {@code financial_connections.account.deactivated}, * {@code financial_connections.account.disconnected}, {@code * financial_connections.account.reactivated}, {@code * financial_connections.account.refreshed_balance}, {@code * financial_connections.account.refreshed_ownership}, {@code * financial_connections.account.refreshed_transactions}, {@code + * financial_connections.account.upcoming_account_number_expiry}, {@code * identity.verification_session.canceled}, {@code identity.verification_session.created}, {@code * identity.verification_session.processing}, {@code identity.verification_session.redacted}, * {@code identity.verification_session.requires_input}, {@code diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index 7449b2bf619..7796bfcb3b7 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -174,6 +174,7 @@ public final class EventDataClassLookup { classLookup.put("scheduled_query_run", com.stripe.model.sigma.ScheduledQueryRun.class); + classLookup.put("tax.association", com.stripe.model.tax.Association.class); classLookup.put("tax.calculation", com.stripe.model.tax.Calculation.class); classLookup.put("tax.calculation_line_item", com.stripe.model.tax.CalculationLineItem.class); classLookup.put("tax.registration", com.stripe.model.tax.Registration.class); @@ -184,6 +185,7 @@ public final class EventDataClassLookup { classLookup.put("terminal.configuration", com.stripe.model.terminal.Configuration.class); classLookup.put("terminal.connection_token", com.stripe.model.terminal.ConnectionToken.class); classLookup.put("terminal.location", com.stripe.model.terminal.Location.class); + classLookup.put("terminal.onboarding_link", com.stripe.model.terminal.OnboardingLink.class); classLookup.put("terminal.reader", com.stripe.model.terminal.Reader.class); classLookup.put("test_helpers.test_clock", com.stripe.model.testhelpers.TestClock.class); diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 9162a9c2ebf..6150fb3c665 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -567,7 +567,6 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("type") String type; - /** Details of the US Bank Account used for this payment attempt. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -1795,9 +1794,9 @@ public static class Grabpay extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1806,9 +1805,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -1829,6 +1828,10 @@ public static class Ideal extends StripeObject { @SerializedName("iban_last4") String ibanLast4; + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + /** * Owner's verified full name. Values are verified or provided by iDEAL directly (if * supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -2871,14 +2874,27 @@ public static class Swish extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Twint extends StripeObject {} - /** Details of the US Bank Account used for this payment attempt. */ + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount extends StripeObject { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + * + *

One of {@code company}, or {@code individual}. + */ @SerializedName("account_holder_type") String accountHolderType; + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + * + *

One of {@code checking}, or {@code savings}. + */ @SerializedName("account_type") String accountType; @@ -2903,11 +2919,11 @@ public static class UsBankAccount extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField mandate; - /** Reference number to locate ACH payments with customer’s bank. */ + /** The ACH payment reference for this transaction. */ @SerializedName("payment_reference") String paymentReference; - /** Routing number of the bank account. */ + /** The routing number for the bank account. */ @SerializedName("routing_number") String routingNumber; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index f252c6baa92..2c30a34f217 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -179,6 +179,9 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

excludedPaymentMethodTypes; + @SerializedName("hooks") + Hooks hooks; + /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -1638,6 +1641,43 @@ public static class AutomaticPaymentMethods extends StripeObject { Boolean enabled; } + /** + * For more details about Hooks, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Hooks extends StripeObject { + @SerializedName("inputs") + Inputs inputs; + + /** + * For more details about Inputs, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Inputs extends StripeObject { + @SerializedName("tax") + Tax tax; + + /** + * For more details about Tax, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** The TaxCalculation id */ + @SerializedName("calculation") + String calculation; + } + } + } + /** * For more details about NextAction, please refer to the API Reference. @@ -5254,6 +5294,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(application, responseGetter); trySetResponseGetter(automaticPaymentMethods, responseGetter); trySetResponseGetter(customer, responseGetter); + trySetResponseGetter(hooks, responseGetter); trySetResponseGetter(lastPaymentError, responseGetter); trySetResponseGetter(latestCharge, responseGetter); trySetResponseGetter(nextAction, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index fa5e6cbe2c5..99162d462a9 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -1897,9 +1897,9 @@ public static class Grabpay extends StripeObject {} public static class Ideal extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, - * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code - * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code + * moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, + * {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1908,9 +1908,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank, if the bank was provided. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2598,7 +2598,8 @@ public static class Blocked extends StripeObject { * *

One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code * bank_account_invalid_details}, {@code bank_account_restricted}, {@code - * bank_account_unusable}, or {@code debit_not_authorized}. + * bank_account_unusable}, {@code debit_not_authorized}, or {@code + * tokenized_account_number_deactivated}. */ @SerializedName("reason") String reason; diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index 26756e7f90c..b8e6ec3a2a9 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -861,7 +861,6 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("type") String type; - /** Details of the US Bank Account used for this payment attempt. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -2089,9 +2088,9 @@ public static class Grabpay extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2100,9 +2099,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2123,6 +2122,10 @@ public static class Ideal extends StripeObject { @SerializedName("iban_last4") String ibanLast4; + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + /** * Owner's verified full name. Values are verified or provided by iDEAL directly (if * supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -3165,14 +3168,27 @@ public static class Swish extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Twint extends StripeObject {} - /** Details of the US Bank Account used for this payment attempt. */ + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount extends StripeObject { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + * + *

One of {@code company}, or {@code individual}. + */ @SerializedName("account_holder_type") String accountHolderType; + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + * + *

One of {@code checking}, or {@code savings}. + */ @SerializedName("account_type") String accountType; @@ -3197,11 +3213,11 @@ public static class UsBankAccount extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField mandate; - /** Reference number to locate ACH payments with customer’s bank. */ + /** The ACH payment reference for this transaction. */ @SerializedName("payment_reference") String paymentReference; - /** Routing number of the bank account. */ + /** The routing number for the bank account. */ @SerializedName("routing_number") String routingNumber; diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index 86641f8018f..c1791e6fae1 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -652,6 +652,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("klarna") Klarna klarna; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("multibanco") Multibanco multibanco; @@ -685,6 +688,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("th_bank_transfer") ThBankTransfer thBankTransfer; + @SerializedName("twint") + Twint twint; + /** * The type of transaction-specific details of the payment method used in the refund (e.g., * {@code card}). An additional hash is included on {@code destination_details} with a name @@ -962,6 +968,26 @@ public static class JpBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject {} + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject { + /** The reference assigned to the refund. */ + @SerializedName("reference") + String reference; + + /** + * Status of the reference on the refund. This can be {@code pending}, {@code available} or + * {@code unavailable}. + */ + @SerializedName("reference_status") + String referenceStatus; + } + /** * For more details about Multibanco, please refer to the API Reference. @@ -1130,6 +1156,15 @@ public static class ThBankTransfer extends StripeObject { String referenceStatus; } + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject {} + /** * For more details about UsBankTransfer, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 1127c8a5486..74986d7968c 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -788,9 +788,9 @@ public static class Cashapp extends StripeObject {} public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -799,9 +799,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code - * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code - * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code + * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code + * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index 917bad09db9..0b40cf7943f 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -365,6 +365,15 @@ public static class PaymentMethodUpdate extends StripeObject { /** Whether the feature is enabled. */ @SerializedName("enabled") Boolean enabled; + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able to + * update their payment method to one of the options specified by the payment method + * configuration. If not set, the default payment method configuration is used. + */ + @SerializedName("payment_method_configuration") + String paymentMethodConfiguration; } /** diff --git a/src/main/java/com/stripe/model/financialconnections/Account.java b/src/main/java/com/stripe/model/financialconnections/Account.java index 46ce0ad5ea6..2dc8a84c762 100644 --- a/src/main/java/com/stripe/model/financialconnections/Account.java +++ b/src/main/java/com/stripe/model/financialconnections/Account.java @@ -38,6 +38,10 @@ public class Account extends ApiResource implements HasId { @SerializedName("account_holder") AccountHolder accountHolder; + /** Details about the account numbers. */ + @SerializedName("account_numbers") + List accountNumbers; + /** The most recent information about the account's balance. */ @SerializedName("balance") Balance balance; @@ -575,6 +579,39 @@ public void setCustomerObject(Customer expandableObject) { } } + /** + * For more details about AccountNumber, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountNumber extends StripeObject { + /** When the account number is expected to expire, if applicable. */ + @SerializedName("expected_expiry_date") + Long expectedExpiryDate; + + /** + * The type of account number associated with the account. + * + *

One of {@code account_number}, or {@code tokenized_account_number}. + */ + @SerializedName("identifier_type") + String identifierType; + + /** + * Whether the account number is currently active and usable for transactions. + * + *

One of {@code deactivated}, or {@code transactable}. + */ + @SerializedName("status") + String status; + + /** The payment networks that the account number can be used for. */ + @SerializedName("supported_networks") + List supportedNetworks; + } + /** * For more details about Balance, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index c2279b0a4a6..2c21195a2df 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -104,6 +104,13 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("last4") String last4; + /** + * Stripe’s assessment of whether this card’s details have been compromised. If this property + * isn't null, cancel and reissue the card to prevent fraudulent activity risk. + */ + @SerializedName("latest_fraud_warning") + LatestFraudWarning latestFraudWarning; + /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. @@ -412,6 +419,30 @@ public Card update(CardUpdateParams params, RequestOptions options) throws Strip return getResponseGetter().request(request, Card.class); } + /** + * For more details about LatestFraudWarning, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LatestFraudWarning extends StripeObject { + /** Timestamp of the most recent fraud warning. */ + @SerializedName("started_at") + Long startedAt; + + /** + * The type of fraud warning that most recently took place on this card. This field updates with + * every new fraud warning, so the value changes over time. If populated, cancel and reissue the + * card. + * + *

One of {@code card_testing_exposure}, {@code fraud_dispute_filed}, {@code + * third_party_reported}, or {@code user_indicated_fraud}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Shipping, please refer to the API * Reference. @@ -1041,6 +1072,7 @@ public Card submitCard(CardSubmitCardParams params, RequestOptions options) public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(cardholder, responseGetter); + trySetResponseGetter(latestFraudWarning, responseGetter); trySetResponseGetter(personalizationDesign, responseGetter); trySetResponseGetter(replacedBy, responseGetter); trySetResponseGetter(replacementFor, responseGetter); diff --git a/src/main/java/com/stripe/model/tax/Association.java b/src/main/java/com/stripe/model/tax/Association.java new file mode 100644 index 00000000000..ec28d2b0d1b --- /dev/null +++ b/src/main/java/com/stripe/model/tax/Association.java @@ -0,0 +1,147 @@ +// File generated from our OpenAPI spec +package com.stripe.model.tax; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.param.tax.AssociationFindParams; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf + * based on the PaymentIntent input. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Association extends ApiResource implements HasId { + /** + * The Tax Calculation that was + * included in PaymentIntent. + */ + @SerializedName("calculation") + String calculation; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code tax.association}. + */ + @SerializedName("object") + String object; + + /** + * The PaymentIntent that this + * Tax Association is tracking. + */ + @SerializedName("payment_intent") + String paymentIntent; + + /** Information about the tax transactions linked to this payment intent. */ + @SerializedName("tax_transaction_attempts") + List taxTransactionAttempts; + + /** Finds a tax association object by PaymentIntent id. */ + public static Association find(Map params) throws StripeException { + return find(params, (RequestOptions) null); + } + + /** Finds a tax association object by PaymentIntent id. */ + public static Association find(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/associations/find"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, Association.class); + } + + /** Finds a tax association object by PaymentIntent id. */ + public static Association find(AssociationFindParams params) throws StripeException { + return find(params, (RequestOptions) null); + } + + /** Finds a tax association object by PaymentIntent id. */ + public static Association find(AssociationFindParams params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/associations/find"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, Association.class); + } + + /** + * For more details about TaxTransactionAttempt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TaxTransactionAttempt extends StripeObject { + @SerializedName("committed") + Committed committed; + + @SerializedName("errored") + Errored errored; + + /** The source of the tax transaction attempt. This is either a refund or a payment intent. */ + @SerializedName("source") + String source; + + /** The status of the transaction attempt. This can be {@code errored} or {@code committed}. */ + @SerializedName("status") + String status; + + /** + * For more details about Committed, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Committed extends StripeObject { + /** The Tax Transaction. */ + @SerializedName("transaction") + String transaction; + } + + /** + * For more details about Errored, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errored extends StripeObject { + /** + * Details on why we couldn't commit the tax transaction. + * + *

One of {@code another_payment_associated_with_calculation}, {@code calculation_expired}, + * {@code currency_mismatch}, {@code original_transaction_voided}, or {@code + * unique_reference_violation}. + */ + @SerializedName("reason") + String reason; + } + } +} diff --git a/src/main/java/com/stripe/model/terminal/OnboardingLink.java b/src/main/java/com/stripe/model/terminal/OnboardingLink.java new file mode 100644 index 00000000000..2ebaf0badc9 --- /dev/null +++ b/src/main/java/com/stripe/model/terminal/OnboardingLink.java @@ -0,0 +1,122 @@ +// File generated from our OpenAPI spec +package com.stripe.model.terminal; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.StripeObject; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.terminal.OnboardingLinkCreateParams; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Returns redirect links used for onboarding onto Tap to Pay on iPhone. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class OnboardingLink extends ApiResource { + /** Link type options associated with the current onboarding link object. */ + @SerializedName("link_options") + LinkOptions linkOptions; + + /** + * The type of link being generated. + * + *

Equal to {@code apple_terms_and_conditions}. + */ + @SerializedName("link_type") + String linkType; + + @SerializedName("object") + String object; + + /** Stripe account ID to generate the link for. */ + @SerializedName("on_behalf_of") + String onBehalfOf; + + /** The link passed back to the user for their onboarding. */ + @SerializedName("redirect_url") + String redirectUrl; + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public static OnboardingLink create(Map params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public static OnboardingLink create(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/terminal/onboarding_links"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, OnboardingLink.class); + } + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public static OnboardingLink create(OnboardingLinkCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public static OnboardingLink create(OnboardingLinkCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/terminal/onboarding_links"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, OnboardingLink.class); + } + + /** Link type options associated with the current onboarding link object. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LinkOptions extends StripeObject { + /** The options associated with the Apple Terms and Conditions link type. */ + @SerializedName("apple_terms_and_conditions") + AppleTermsAndConditions appleTermsAndConditions; + + /** Options associated with the Apple Terms and Conditions link type. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AppleTermsAndConditions extends StripeObject { + /** Whether the link should also support users relinking their Apple account. */ + @SerializedName("allow_relinking") + Boolean allowRelinking; + + /** The business name of the merchant accepting Apple's Terms and Conditions. */ + @SerializedName("merchant_display_name") + String merchantDisplayName; + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(linkOptions, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/v2/core/Event.java b/src/main/java/com/stripe/model/v2/core/Event.java index 0d0963ecdfc..1c9b0fed797 100644 --- a/src/main/java/com/stripe/model/v2/core/Event.java +++ b/src/main/java/com/stripe/model/v2/core/Event.java @@ -14,6 +14,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import java.time.Instant; +import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -34,6 +35,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Event extends StripeObject implements HasId, StripeActiveObject { + /** Before and after changes for the primary related object. */ + @SerializedName("changes") + Map changes; + /** Authentication context needed to fetch the event or related object. */ @SerializedName("context") String context; diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 00c89595810..81fbe94c2cb 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -3314,6 +3314,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java index 7c68b8b5907..686751224ce 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionCollectionListParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -52,11 +56,13 @@ public class CustomerBalanceTransactionCollectionListParams extends ApiRequestPa String startingAfter; private CustomerBalanceTransactionCollectionListParams( + Object created, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -69,6 +75,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -82,7 +90,28 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionCollectionListParams build() { return new CustomerBalanceTransactionCollectionListParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionCollectionListParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -169,4 +198,115 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionCollectionListParams.Created build() { + return new CustomerBalanceTransactionCollectionListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionCollectionListParams.Created#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionCollectionListParams.Created#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java index 2177805074e..e2191f7e6da 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionListParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -52,11 +56,13 @@ public class CustomerBalanceTransactionListParams extends ApiRequestParams { String startingAfter; private CustomerBalanceTransactionListParams( + Object created, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -69,6 +75,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -82,7 +90,28 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionListParams build() { return new CustomerBalanceTransactionListParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionListParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -168,4 +197,114 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionListParams.Created build() { + return new CustomerBalanceTransactionListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionListParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionListParams.Created#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java index 5bd309da028..cc2de9dd2d7 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionsParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -52,11 +56,13 @@ public class CustomerBalanceTransactionsParams extends ApiRequestParams { String startingAfter; private CustomerBalanceTransactionsParams( + Object created, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -69,6 +75,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -82,7 +90,28 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionsParams build() { return new CustomerBalanceTransactionsParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionsParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -168,4 +197,114 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionsParams.Created build() { + return new CustomerBalanceTransactionsParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionsParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionsParams.Created#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/InvoicePaymentListParams.java b/src/main/java/com/stripe/param/InvoicePaymentListParams.java index bfc2be62b7e..2a8bef332a1 100644 --- a/src/main/java/com/stripe/param/InvoicePaymentListParams.java +++ b/src/main/java/com/stripe/param/InvoicePaymentListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class InvoicePaymentListParams extends ApiRequestParams { + /** Only return invoice payments that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -64,6 +68,7 @@ public class InvoicePaymentListParams extends ApiRequestParams { Status status; private InvoicePaymentListParams( + Object created, String endingBefore, List expand, Map extraParams, @@ -72,6 +77,7 @@ private InvoicePaymentListParams( Payment payment, String startingAfter, Status status) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -87,6 +93,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -106,6 +114,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public InvoicePaymentListParams build() { return new InvoicePaymentListParams( + this.created, this.endingBefore, this.expand, this.extraParams, @@ -116,6 +125,18 @@ public InvoicePaymentListParams build() { this.status); } + /** Only return invoice payments that were created during the given date interval. */ + public Builder setCreated(InvoicePaymentListParams.Created created) { + this.created = created; + return this; + } + + /** Only return invoice payments that were created during the given date interval. */ + public Builder setCreated(Long created) { + this.created = created; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -218,6 +239,115 @@ public Builder setStatus(InvoicePaymentListParams.Status status) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoicePaymentListParams.Created build() { + return new InvoicePaymentListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoicePaymentListParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoicePaymentListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payment { diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 59f171ab6c6..038551f6ef9 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -58,6 +58,10 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { @SerializedName("final_capture") Boolean finalCapture; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + Hooks hooks; + /** * 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 @@ -109,6 +113,7 @@ private PaymentIntentCaptureParams( List expand, Map extraParams, Boolean finalCapture, + Hooks hooks, Object metadata, Object paymentDetails, String statementDescriptor, @@ -120,6 +125,7 @@ private PaymentIntentCaptureParams( this.expand = expand; this.extraParams = extraParams; this.finalCapture = finalCapture; + this.hooks = hooks; this.metadata = metadata; this.paymentDetails = paymentDetails; this.statementDescriptor = statementDescriptor; @@ -144,6 +150,8 @@ public static class Builder { private Boolean finalCapture; + private Hooks hooks; + private Object metadata; private Object paymentDetails; @@ -163,6 +171,7 @@ public PaymentIntentCaptureParams build() { this.expand, this.extraParams, this.finalCapture, + this.hooks, this.metadata, this.paymentDetails, this.statementDescriptor, @@ -261,6 +270,12 @@ public Builder setFinalCapture(Boolean finalCapture) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentCaptureParams.Hooks hooks) { + this.hooks = hooks; + 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 @@ -1684,6 +1699,234 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Hooks(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 PaymentIntentCaptureParams.Hooks build() { + return new PaymentIntentCaptureParams.Hooks(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 + * PaymentIntentCaptureParams.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentCaptureParams.Hooks#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(PaymentIntentCaptureParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.Hooks.Inputs build() { + return new PaymentIntentCaptureParams.Hooks.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 PaymentIntentCaptureParams.Hooks.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 PaymentIntentCaptureParams.Hooks.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(PaymentIntentCaptureParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCaptureParams.Hooks.Inputs.Tax build() { + return new PaymentIntentCaptureParams.Hooks.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 PaymentIntentCaptureParams.Hooks.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 PaymentIntentCaptureParams.Hooks.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 @EqualsAndHashCode(callSuper = false) public static class PaymentDetails { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index be80c26d41b..c3763295bee 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -58,6 +58,10 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + Hooks hooks; + /** ID of the mandate that's used for this payment. */ @SerializedName("mandate") String mandate; @@ -180,6 +184,7 @@ private PaymentIntentConfirmParams( Object excludedPaymentMethodTypes, List expand, Map extraParams, + Hooks hooks, String mandate, Object mandateData, Object offSession, @@ -201,6 +206,7 @@ private PaymentIntentConfirmParams( this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; + this.hooks = hooks; this.mandate = mandate; this.mandateData = mandateData; this.offSession = offSession; @@ -236,6 +242,8 @@ public static class Builder { private Map extraParams; + private Hooks hooks; + private String mandate; private Object mandateData; @@ -274,6 +282,7 @@ public PaymentIntentConfirmParams build() { this.excludedPaymentMethodTypes, this.expand, this.extraParams, + this.hooks, this.mandate, this.mandateData, this.offSession, @@ -433,6 +442,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentConfirmParams.Hooks hooks) { + this.hooks = hooks; + return this; + } + /** ID of the mandate that's used for this payment. */ public Builder setMandate(String mandate) { this.mandate = mandate; @@ -1982,6 +1997,234 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Hooks(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.Hooks build() { + return new PaymentIntentConfirmParams.Hooks(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.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks#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.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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.Hooks.Inputs build() { + return new PaymentIntentConfirmParams.Hooks.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.Hooks.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.Hooks.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.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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.Hooks.Inputs.Tax build() { + return new PaymentIntentConfirmParams.Hooks.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.Hooks.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.Hooks.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 @EqualsAndHashCode(callSuper = false) public static class MandateData { @@ -5593,6 +5836,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index f53ec480c20..020b4c15756 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -136,6 +136,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + Hooks hooks; + /** * ID of the mandate that's used for this payment. This parameter can only be used with {@code @@ -341,6 +345,7 @@ private PaymentIntentCreateParams( List excludedPaymentMethodTypes, List expand, Map extraParams, + Hooks hooks, String mandate, Object mandateData, Map metadata, @@ -377,6 +382,7 @@ private PaymentIntentCreateParams( this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; + this.hooks = hooks; this.mandate = mandate; this.mandateData = mandateData; this.metadata = metadata; @@ -435,6 +441,8 @@ public static class Builder { private Map extraParams; + private Hooks hooks; + private String mandate; private Object mandateData; @@ -495,6 +503,7 @@ public PaymentIntentCreateParams build() { this.excludedPaymentMethodTypes, this.expand, this.extraParams, + this.hooks, this.mandate, this.mandateData, this.metadata, @@ -730,6 +739,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentCreateParams.Hooks hooks) { + this.hooks = hooks; + return this; + } + /** * ID of the mandate that's used for this payment. This parameter can only be used with {@code @@ -2457,6 +2472,234 @@ public enum AllowRedirects implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Hooks(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 PaymentIntentCreateParams.Hooks build() { + return new PaymentIntentCreateParams.Hooks(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 + * PaymentIntentCreateParams.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentCreateParams.Hooks#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(PaymentIntentCreateParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCreateParams.Hooks.Inputs build() { + return new PaymentIntentCreateParams.Hooks.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 PaymentIntentCreateParams.Hooks.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 PaymentIntentCreateParams.Hooks.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(PaymentIntentCreateParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentCreateParams.Hooks.Inputs.Tax build() { + return new PaymentIntentCreateParams.Hooks.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 PaymentIntentCreateParams.Hooks.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 PaymentIntentCreateParams.Hooks.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 @EqualsAndHashCode(callSuper = false) public static class MandateData { @@ -6072,6 +6315,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index bbe4dffec66..f5554e10234 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -52,6 +52,10 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + Hooks hooks; + /** * 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 @@ -90,6 +94,7 @@ private PaymentIntentIncrementAuthorizationParams( String description, List expand, Map extraParams, + Hooks hooks, Map metadata, PaymentDetails paymentDetails, String statementDescriptor, @@ -100,6 +105,7 @@ private PaymentIntentIncrementAuthorizationParams( this.description = description; this.expand = expand; this.extraParams = extraParams; + this.hooks = hooks; this.metadata = metadata; this.paymentDetails = paymentDetails; this.statementDescriptor = statementDescriptor; @@ -123,6 +129,8 @@ public static class Builder { private Map extraParams; + private Hooks hooks; + private Map metadata; private PaymentDetails paymentDetails; @@ -140,6 +148,7 @@ public PaymentIntentIncrementAuthorizationParams build() { this.description, this.expand, this.extraParams, + this.hooks, this.metadata, this.paymentDetails, this.statementDescriptor, @@ -233,6 +242,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentIncrementAuthorizationParams.Hooks hooks) { + this.hooks = hooks; + 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 @@ -1640,6 +1655,236 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Hooks(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 PaymentIntentIncrementAuthorizationParams.Hooks build() { + return new PaymentIntentIncrementAuthorizationParams.Hooks(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 + * PaymentIntentIncrementAuthorizationParams.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentIncrementAuthorizationParams.Hooks#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(PaymentIntentIncrementAuthorizationParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentIncrementAuthorizationParams.Hooks.Inputs build() { + return new PaymentIntentIncrementAuthorizationParams.Hooks.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 PaymentIntentIncrementAuthorizationParams.Hooks.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 PaymentIntentIncrementAuthorizationParams.Hooks.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(PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax build() { + return new PaymentIntentIncrementAuthorizationParams.Hooks.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 PaymentIntentIncrementAuthorizationParams.Hooks.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 PaymentIntentIncrementAuthorizationParams.Hooks.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 @EqualsAndHashCode(callSuper = false) public static class PaymentDetails { diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 0dda380c7a8..bb478056734 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -89,6 +89,10 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + Hooks hooks; + /** * 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 @@ -228,6 +232,7 @@ private PaymentIntentUpdateParams( Object excludedPaymentMethodTypes, List expand, Map extraParams, + Hooks hooks, Object metadata, Object paymentDetails, Object paymentMethod, @@ -252,6 +257,7 @@ private PaymentIntentUpdateParams( this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; + this.hooks = hooks; this.metadata = metadata; this.paymentDetails = paymentDetails; this.paymentMethod = paymentMethod; @@ -293,6 +299,8 @@ public static class Builder { private Map extraParams; + private Hooks hooks; + private Object metadata; private Object paymentDetails; @@ -334,6 +342,7 @@ public PaymentIntentUpdateParams build() { this.excludedPaymentMethodTypes, this.expand, this.extraParams, + this.hooks, this.metadata, this.paymentDetails, this.paymentMethod, @@ -577,6 +586,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentUpdateParams.Hooks hooks) { + this.hooks = hooks; + 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 @@ -2303,6 +2318,234 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Hooks(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 PaymentIntentUpdateParams.Hooks build() { + return new PaymentIntentUpdateParams.Hooks(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 + * PaymentIntentUpdateParams.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentUpdateParams.Hooks#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(PaymentIntentUpdateParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.Hooks.Inputs build() { + return new PaymentIntentUpdateParams.Hooks.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 PaymentIntentUpdateParams.Hooks.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 PaymentIntentUpdateParams.Hooks.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(PaymentIntentUpdateParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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 PaymentIntentUpdateParams.Hooks.Inputs.Tax build() { + return new PaymentIntentUpdateParams.Hooks.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 PaymentIntentUpdateParams.Hooks.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 PaymentIntentUpdateParams.Hooks.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 @EqualsAndHashCode(callSuper = false) public static class PaymentDetails { @@ -5628,6 +5871,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index da7e11fdb17..9808d903ed2 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -3458,6 +3458,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 4bcd9097ef6..9ec2a506642 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -3706,6 +3706,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index d0d72cddfcb..d6941f506e7 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -4217,6 +4217,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 693ef09c43f..6408d4445fb 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -3674,6 +3674,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index dc6aa7204ef..9387c1fb16e 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -633,7 +633,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_09_30_CLOVER("2025-09-30.clover"), @SerializedName("2025-10-29.clover") - VERSION_2025_10_29_CLOVER("2025-10-29.clover"); + VERSION_2025_10_29_CLOVER("2025-10-29.clover"), + + @SerializedName("2025-11-17.clover") + VERSION_2025_11_17_CLOVER("2025-11-17.clover"); @Getter(onMethod_ = {@Override}) private final String value; @@ -861,6 +864,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("file.created") FILE__CREATED("file.created"), + @SerializedName("financial_connections.account.account_numbers_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__ACCOUNT_NUMBERS_UPDATED( + "financial_connections.account.account_numbers_updated"), + @SerializedName("financial_connections.account.created") FINANCIAL_CONNECTIONS__ACCOUNT__CREATED("financial_connections.account.created"), @@ -885,6 +892,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { FINANCIAL_CONNECTIONS__ACCOUNT__REFRESHED_TRANSACTIONS( "financial_connections.account.refreshed_transactions"), + @SerializedName("financial_connections.account.upcoming_account_number_expiry") + FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_ACCOUNT_NUMBER_EXPIRY( + "financial_connections.account.upcoming_account_number_expiry"), + @SerializedName("identity.verification_session.canceled") IDENTITY__VERIFICATION_SESSION__CANCELED("identity.verification_session.canceled"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index 6065deb5fa2..79dd030613d 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -480,6 +480,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("file.created") FILE__CREATED("file.created"), + @SerializedName("financial_connections.account.account_numbers_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__ACCOUNT_NUMBERS_UPDATED( + "financial_connections.account.account_numbers_updated"), + @SerializedName("financial_connections.account.created") FINANCIAL_CONNECTIONS__ACCOUNT__CREATED("financial_connections.account.created"), @@ -504,6 +508,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { FINANCIAL_CONNECTIONS__ACCOUNT__REFRESHED_TRANSACTIONS( "financial_connections.account.refreshed_transactions"), + @SerializedName("financial_connections.account.upcoming_account_number_expiry") + FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_ACCOUNT_NUMBER_EXPIRY( + "financial_connections.account.upcoming_account_number_expiry"), + @SerializedName("identity.verification_session.canceled") IDENTITY__VERIFICATION_SESSION__CANCELED("identity.verification_session.canceled"), diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java index 88ea2baed99..38a837693dc 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java @@ -2612,6 +2612,10 @@ public static class RiskAssessment { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Stripe’s assessment of this authorization’s likelihood to be fraudulent. */ + @SerializedName("fraud_risk") + FraudRisk fraudRisk; + /** * The dispute risk of the merchant (the seller on a purchase) on an authorization based on all * Stripe Issuing activity. @@ -2622,9 +2626,11 @@ public static class RiskAssessment { private RiskAssessment( CardTestingRisk cardTestingRisk, Map extraParams, + FraudRisk fraudRisk, MerchantDisputeRisk merchantDisputeRisk) { this.cardTestingRisk = cardTestingRisk; this.extraParams = extraParams; + this.fraudRisk = fraudRisk; this.merchantDisputeRisk = merchantDisputeRisk; } @@ -2637,12 +2643,14 @@ public static class Builder { private Map extraParams; + private FraudRisk fraudRisk; + private MerchantDisputeRisk merchantDisputeRisk; /** Finalize and obtain parameter instance from this builder. */ public AuthorizationCreateParams.RiskAssessment build() { return new AuthorizationCreateParams.RiskAssessment( - this.cardTestingRisk, this.extraParams, this.merchantDisputeRisk); + this.cardTestingRisk, this.extraParams, this.fraudRisk, this.merchantDisputeRisk); } /** Stripe's assessment of this authorization's likelihood of being card testing activity. */ @@ -2679,6 +2687,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Stripe’s assessment of this authorization’s likelihood to be fraudulent. */ + public Builder setFraudRisk(AuthorizationCreateParams.RiskAssessment.FraudRisk fraudRisk) { + this.fraudRisk = fraudRisk; + return this; + } + /** * The dispute risk of the merchant (the seller on a purchase) on an authorization based on * all Stripe Issuing activity. @@ -2851,6 +2865,132 @@ public enum RiskLevel implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FraudRisk { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Stripe’s assessment of the likelihood of fraud on an + * authorization. + */ + @SerializedName("level") + Level level; + + /** + * Stripe’s numerical model score assessing the likelihood of fraudulent activity. A higher + * score means a higher likelihood of fraudulent activity, and anything above 25 is considered + * high risk. + */ + @SerializedName("score") + BigDecimal score; + + private FraudRisk(Map extraParams, Level level, BigDecimal score) { + this.extraParams = extraParams; + this.level = level; + this.score = score; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Level level; + + private BigDecimal score; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.FraudRisk build() { + return new AuthorizationCreateParams.RiskAssessment.FraudRisk( + this.extraParams, this.level, this.score); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.FraudRisk#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.FraudRisk#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. Stripe’s assessment of the likelihood of fraud on an + * authorization. + */ + public Builder setLevel(AuthorizationCreateParams.RiskAssessment.FraudRisk.Level level) { + this.level = level; + return this; + } + + /** + * Stripe’s numerical model score assessing the likelihood of fraudulent activity. A higher + * score means a higher likelihood of fraudulent activity, and anything above 25 is + * considered high risk. + */ + public Builder setScore(BigDecimal score) { + this.score = score; + return this; + } + } + + public enum Level implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Level(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class MerchantDisputeRisk { diff --git a/src/main/java/com/stripe/param/tax/AssociationFindParams.java b/src/main/java/com/stripe/param/tax/AssociationFindParams.java new file mode 100644 index 00000000000..772b96a0c5d --- /dev/null +++ b/src/main/java/com/stripe/param/tax/AssociationFindParams.java @@ -0,0 +1,120 @@ +// File generated from our OpenAPI spec +package com.stripe.param.tax; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AssociationFindParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Valid PaymentIntent id + */ + @SerializedName("payment_intent") + String paymentIntent; + + private AssociationFindParams( + List expand, Map extraParams, String paymentIntent) { + this.expand = expand; + this.extraParams = extraParams; + this.paymentIntent = paymentIntent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private String paymentIntent; + + /** Finalize and obtain parameter instance from this builder. */ + public AssociationFindParams build() { + return new AssociationFindParams(this.expand, this.extraParams, this.paymentIntent); + } + + /** + * 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 + * AssociationFindParams#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 + * AssociationFindParams#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 + * AssociationFindParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AssociationFindParams#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. Valid PaymentIntent id + */ + public Builder setPaymentIntent(String paymentIntent) { + this.paymentIntent = paymentIntent; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index 52cfac9b0c1..3a272c23e08 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -15785,9 +15785,10 @@ public static class LocalAmusementTax { * Required. A FIPS code * representing the local jurisdiction. Supported FIPS codes are: {@code 14000} (Chicago), - * {@code 06613} (Bloomington), {@code 21696} (East Dundee), {@code 24582} (Evanston), - * {@code 45421} (Lynwood), {@code 48892} (Midlothian), {@code 64343} (River Grove), and - * {@code 68081} (Schiller Park). + * {@code 02154} (Arlington Heights), {@code 06613} (Bloomington), {@code 10906} (Campton + * Hills), {@code 21696} (East Dundee), {@code 24582} (Evanston), {@code 45421} (Lynwood), + * {@code 48892} (Midlothian), {@code 64343} (River Grove), and {@code 68081} (Schiller + * Park). */ @SerializedName("jurisdiction") String jurisdiction; @@ -15846,9 +15847,10 @@ public Builder putAllExtraParam(Map map) { * Required. A FIPS code * representing the local jurisdiction. Supported FIPS codes are: {@code 14000} (Chicago), - * {@code 06613} (Bloomington), {@code 21696} (East Dundee), {@code 24582} (Evanston), - * {@code 45421} (Lynwood), {@code 48892} (Midlothian), {@code 64343} (River Grove), and - * {@code 68081} (Schiller Park). + * {@code 02154} (Arlington Heights), {@code 06613} (Bloomington), {@code 10906} (Campton + * Hills), {@code 21696} (East Dundee), {@code 24582} (Evanston), {@code 45421} (Lynwood), + * {@code 48892} (Midlothian), {@code 64343} (River Grove), and {@code 68081} (Schiller + * Park). */ public Builder setJurisdiction(String jurisdiction) { this.jurisdiction = jurisdiction; diff --git a/src/main/java/com/stripe/param/terminal/OnboardingLinkCreateParams.java b/src/main/java/com/stripe/param/terminal/OnboardingLinkCreateParams.java new file mode 100644 index 00000000000..e0d2b2b5479 --- /dev/null +++ b/src/main/java/com/stripe/param/terminal/OnboardingLinkCreateParams.java @@ -0,0 +1,323 @@ +// File generated from our OpenAPI spec +package com.stripe.param.terminal; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class OnboardingLinkCreateParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Specific fields needed to generate the desired link type. */ + @SerializedName("link_options") + LinkOptions linkOptions; + + /** Required. The type of link being generated. */ + @SerializedName("link_type") + LinkType linkType; + + /** Stripe account ID to generate the link for. */ + @SerializedName("on_behalf_of") + String onBehalfOf; + + private OnboardingLinkCreateParams( + List expand, + Map extraParams, + LinkOptions linkOptions, + LinkType linkType, + String onBehalfOf) { + this.expand = expand; + this.extraParams = extraParams; + this.linkOptions = linkOptions; + this.linkType = linkType; + this.onBehalfOf = onBehalfOf; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private LinkOptions linkOptions; + + private LinkType linkType; + + private String onBehalfOf; + + /** Finalize and obtain parameter instance from this builder. */ + public OnboardingLinkCreateParams build() { + return new OnboardingLinkCreateParams( + this.expand, this.extraParams, this.linkOptions, this.linkType, this.onBehalfOf); + } + + /** + * 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 + * OnboardingLinkCreateParams#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 + * OnboardingLinkCreateParams#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 + * OnboardingLinkCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OnboardingLinkCreateParams#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. Specific fields needed to generate the desired link type. */ + public Builder setLinkOptions(OnboardingLinkCreateParams.LinkOptions linkOptions) { + this.linkOptions = linkOptions; + return this; + } + + /** Required. The type of link being generated. */ + public Builder setLinkType(OnboardingLinkCreateParams.LinkType linkType) { + this.linkType = linkType; + return this; + } + + /** Stripe account ID to generate the link for. */ + public Builder setOnBehalfOf(String onBehalfOf) { + this.onBehalfOf = onBehalfOf; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LinkOptions { + /** The options associated with the Apple Terms and Conditions link type. */ + @SerializedName("apple_terms_and_conditions") + AppleTermsAndConditions appleTermsAndConditions; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 LinkOptions( + AppleTermsAndConditions appleTermsAndConditions, Map extraParams) { + this.appleTermsAndConditions = appleTermsAndConditions; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AppleTermsAndConditions appleTermsAndConditions; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OnboardingLinkCreateParams.LinkOptions build() { + return new OnboardingLinkCreateParams.LinkOptions( + this.appleTermsAndConditions, this.extraParams); + } + + /** The options associated with the Apple Terms and Conditions link type. */ + public Builder setAppleTermsAndConditions( + OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions appleTermsAndConditions) { + this.appleTermsAndConditions = appleTermsAndConditions; + 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 + * OnboardingLinkCreateParams.LinkOptions#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OnboardingLinkCreateParams.LinkOptions#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 + @EqualsAndHashCode(callSuper = false) + public static class AppleTermsAndConditions { + /** Whether the link should also support users relinking their Apple account. */ + @SerializedName("allow_relinking") + Boolean allowRelinking; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 business name of the merchant accepting Apple's Terms and + * Conditions. + */ + @SerializedName("merchant_display_name") + String merchantDisplayName; + + private AppleTermsAndConditions( + Boolean allowRelinking, Map extraParams, String merchantDisplayName) { + this.allowRelinking = allowRelinking; + this.extraParams = extraParams; + this.merchantDisplayName = merchantDisplayName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean allowRelinking; + + private Map extraParams; + + private String merchantDisplayName; + + /** Finalize and obtain parameter instance from this builder. */ + public OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions build() { + return new OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions( + this.allowRelinking, this.extraParams, this.merchantDisplayName); + } + + /** Whether the link should also support users relinking their Apple account. */ + public Builder setAllowRelinking(Boolean allowRelinking) { + this.allowRelinking = allowRelinking; + 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 + * OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions#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 business name of the merchant accepting Apple's Terms and + * Conditions. + */ + public Builder setMerchantDisplayName(String merchantDisplayName) { + this.merchantDisplayName = merchantDisplayName; + return this; + } + } + } + } + + public enum LinkType implements ApiRequestParams.EnumParam { + @SerializedName("apple_terms_and_conditions") + APPLE_TERMS_AND_CONDITIONS("apple_terms_and_conditions"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LinkType(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/service/TaxService.java b/src/main/java/com/stripe/service/TaxService.java index 58b250a5063..1d5409dde43 100644 --- a/src/main/java/com/stripe/service/TaxService.java +++ b/src/main/java/com/stripe/service/TaxService.java @@ -9,6 +9,10 @@ public TaxService(StripeResponseGetter responseGetter) { super(responseGetter); } + public com.stripe.service.tax.AssociationService associations() { + return new com.stripe.service.tax.AssociationService(this.getResponseGetter()); + } + public com.stripe.service.tax.CalculationService calculations() { return new com.stripe.service.tax.CalculationService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/TerminalService.java b/src/main/java/com/stripe/service/TerminalService.java index c1996484c08..467d19f458f 100644 --- a/src/main/java/com/stripe/service/TerminalService.java +++ b/src/main/java/com/stripe/service/TerminalService.java @@ -21,6 +21,10 @@ public com.stripe.service.terminal.LocationService locations() { return new com.stripe.service.terminal.LocationService(this.getResponseGetter()); } + public com.stripe.service.terminal.OnboardingLinkService onboardingLinks() { + return new com.stripe.service.terminal.OnboardingLinkService(this.getResponseGetter()); + } + public com.stripe.service.terminal.ReaderService readers() { return new com.stripe.service.terminal.ReaderService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/tax/AssociationService.java b/src/main/java/com/stripe/service/tax/AssociationService.java new file mode 100644 index 00000000000..b10b004975c --- /dev/null +++ b/src/main/java/com/stripe/service/tax/AssociationService.java @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +package com.stripe.service.tax; + +import com.stripe.exception.StripeException; +import com.stripe.model.tax.Association; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.tax.AssociationFindParams; + +public final class AssociationService extends ApiService { + public AssociationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Finds a tax association object by PaymentIntent id. */ + public Association find(AssociationFindParams params) throws StripeException { + return find(params, (RequestOptions) null); + } + /** Finds a tax association object by PaymentIntent id. */ + public Association find(AssociationFindParams params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/associations/find"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Association.class); + } +} diff --git a/src/main/java/com/stripe/service/terminal/OnboardingLinkService.java b/src/main/java/com/stripe/service/terminal/OnboardingLinkService.java new file mode 100644 index 00000000000..72401a1f53b --- /dev/null +++ b/src/main/java/com/stripe/service/terminal/OnboardingLinkService.java @@ -0,0 +1,43 @@ +// File generated from our OpenAPI spec +package com.stripe.service.terminal; + +import com.stripe.exception.StripeException; +import com.stripe.model.terminal.OnboardingLink; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.terminal.OnboardingLinkCreateParams; + +public final class OnboardingLinkService extends ApiService { + public OnboardingLinkService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public OnboardingLink create(OnboardingLinkCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public OnboardingLink create(OnboardingLinkCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/terminal/onboarding_links"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, OnboardingLink.class); + } +} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 6eeab497786..8b1d3202870 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3208,7 +3208,7 @@ public void testCoreEventsGetServices() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); + "{\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("ll_123"); From db05641e234748e6a1803d08f891c40ce38cec9a Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 11:43:54 -0800 Subject: [PATCH 15/17] Update generated code (#2113) * Update generated code for v2123 and * Update generated code for v2124 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/v2/core/Event.java | 5 - .../stripe/param/v2/core/EventListParams.java | 188 ++++++++++++------ .../stripe/functional/GeneratedExamples.java | 2 +- 5 files changed, 127 insertions(+), 72 deletions(-) diff --git a/API_VERSION b/API_VERSION index 2f15c36285b..3304332752d 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -a4d4c803dcbf205368dc65179c7eca4748aadaf7 \ No newline at end of file +e62524b587909bee231a15ce0dc618f1d04f69a4 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e67a81ed1b3..ea1ecdee172 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2123 \ No newline at end of file +v2124 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/v2/core/Event.java b/src/main/java/com/stripe/model/v2/core/Event.java index 1c9b0fed797..0d0963ecdfc 100644 --- a/src/main/java/com/stripe/model/v2/core/Event.java +++ b/src/main/java/com/stripe/model/v2/core/Event.java @@ -14,7 +14,6 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import java.time.Instant; -import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -35,10 +34,6 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Event extends StripeObject implements HasId, StripeActiveObject { - /** Before and after changes for the primary related object. */ - @SerializedName("changes") - Map changes; - /** Authentication context needed to fetch the event or related object. */ @SerializedName("context") String context; diff --git a/src/main/java/com/stripe/param/v2/core/EventListParams.java b/src/main/java/com/stripe/param/v2/core/EventListParams.java index be4f3b17dbd..c0d2274654f 100644 --- a/src/main/java/com/stripe/param/v2/core/EventListParams.java +++ b/src/main/java/com/stripe/param/v2/core/EventListParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class EventListParams extends ApiRequestParams { + /** Set of filters to query events within a range of {@code created} timestamps. */ + @SerializedName("created") + Created created; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -23,26 +27,10 @@ public class EventListParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Filter for events created after the specified timestamp. */ - @SerializedName("gt") - Instant gt; - - /** Filter for events created at or after the specified timestamp. */ - @SerializedName("gte") - Instant gte; - /** The page size. */ @SerializedName("limit") Long limit; - /** Filter for events created before the specified timestamp. */ - @SerializedName("lt") - Instant lt; - - /** Filter for events created at or before the specified timestamp. */ - @SerializedName("lte") - Instant lte; - /** Primary object ID used to retrieve related events. */ @SerializedName("object_id") String objectId; @@ -52,20 +40,14 @@ public class EventListParams extends ApiRequestParams { List types; private EventListParams( + Created created, Map extraParams, - Instant gt, - Instant gte, Long limit, - Instant lt, - Instant lte, String objectId, List types) { + this.created = created; this.extraParams = extraParams; - this.gt = gt; - this.gte = gte; this.limit = limit; - this.lt = lt; - this.lte = lte; this.objectId = objectId; this.types = types; } @@ -75,18 +57,12 @@ public static Builder builder() { } public static class Builder { - private Map extraParams; - - private Instant gt; + private Created created; - private Instant gte; + private Map extraParams; private Long limit; - private Instant lt; - - private Instant lte; - private String objectId; private List types; @@ -94,14 +70,13 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public EventListParams build() { return new EventListParams( - this.extraParams, - this.gt, - this.gte, - this.limit, - this.lt, - this.lte, - this.objectId, - this.types); + this.created, this.extraParams, this.limit, this.objectId, this.types); + } + + /** Set of filters to query events within a range of {@code created} timestamps. */ + public Builder setCreated(EventListParams.Created created) { + this.created = created; + return this; } /** @@ -130,36 +105,12 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Filter for events created after the specified timestamp. */ - public Builder setGt(Instant gt) { - this.gt = gt; - return this; - } - - /** Filter for events created at or after the specified timestamp. */ - public Builder setGte(Instant gte) { - this.gte = gte; - return this; - } - /** The page size. */ public Builder setLimit(Long limit) { this.limit = limit; return this; } - /** Filter for events created before the specified timestamp. */ - public Builder setLt(Instant lt) { - this.lt = lt; - return this; - } - - /** Filter for events created at or before the specified timestamp. */ - public Builder setLte(Instant lte) { - this.lte = lte; - return this; - } - /** Primary object ID used to retrieve related events. */ public Builder setObjectId(String objectId) { this.objectId = objectId; @@ -192,4 +143,113 @@ public Builder addAllType(List elements) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Filter for events created after the specified timestamp. */ + @SerializedName("gt") + Instant gt; + + /** Filter for events created at or after the specified timestamp. */ + @SerializedName("gte") + Instant gte; + + /** Filter for events created before the specified timestamp. */ + @SerializedName("lt") + Instant lt; + + /** Filter for events created at or before the specified timestamp. */ + @SerializedName("lte") + Instant lte; + + private Created( + Map extraParams, Instant gt, Instant gte, Instant lt, Instant lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant gt; + + private Instant gte; + + private Instant lt; + + private Instant lte; + + /** Finalize and obtain parameter instance from this builder. */ + public EventListParams.Created build() { + return new EventListParams.Created(this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * EventListParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link EventListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Filter for events created after the specified timestamp. */ + public Builder setGt(Instant gt) { + this.gt = gt; + return this; + } + + /** Filter for events created at or after the specified timestamp. */ + public Builder setGte(Instant gte) { + this.gte = gte; + return this; + } + + /** Filter for events created before the specified timestamp. */ + public Builder setLt(Instant lt) { + this.lt = lt; + return this; + } + + /** Filter for events created at or before the specified timestamp. */ + public Builder setLte(Instant lte) { + this.lte = lte; + return this; + } + } + } } diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 8b1d3202870..6eeab497786 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3208,7 +3208,7 @@ public void testCoreEventsGetServices() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); + "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("ll_123"); From 6a30e75509d39ceb9c185a8388dfa63e8d7262a5 Mon Sep 17 00:00:00 2001 From: Michael Broshi <94012587+mbroshi-stripe@users.noreply.github.com> Date: Mon, 17 Nov 2025 11:54:06 -0800 Subject: [PATCH 16/17] Update v2 array parameter serialization to use indexed format (#2110) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update v2 array parameter serialization to use indexed format Change array parameter serialization for v2 endpoints to use indexed format (e.g., ?include[0]=foo&include[1]=bar) instead of the repeated parameter format (e.g., ?include=foo&include=bar). This aligns v2 behavior with v1 for consistency. Changes: - Modified FormEncoder.java flattenParamsCollection to always use indexed format - Updated tests to expect indexed format for v2 arrays 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Committed-By-Agent: claude * Remove references to arraysAsRepeated * Format code * Remove deprecated function * Fix formatting --------- Co-authored-by: Claude Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> --- src/main/java/com/stripe/net/FormEncoder.java | 48 ++++++------------- .../java/com/stripe/net/StripeRequest.java | 9 ++-- .../java/com/stripe/net/FormEncoderTest.java | 20 +++----- 3 files changed, 25 insertions(+), 52 deletions(-) diff --git a/src/main/java/com/stripe/net/FormEncoder.java b/src/main/java/com/stripe/net/FormEncoder.java index d05e4be6ee3..ec608236a3d 100644 --- a/src/main/java/com/stripe/net/FormEncoder.java +++ b/src/main/java/com/stripe/net/FormEncoder.java @@ -22,7 +22,7 @@ public static HttpContent createHttpContent(Map params) throws I return HttpContent.buildFormURLEncodedContent(new ArrayList>()); } - Collection> flatParams = flattenParams(params, false); + Collection> flatParams = flattenParams(params); // If all parameters have been encoded as strings, then the content can be represented // with application/x-www-form-url-encoded encoding. Otherwise, use @@ -46,24 +46,12 @@ public static HttpContent createHttpContent(Map params) throws I * @return The query string. */ public static String createQueryString(Map params) { - return FormEncoder.createQueryString(params, false); - } - - /** - * Creates the HTTP query string for a given map of parameters. - * - * @param params The map of parameters. - * @param arraysAsRepeated Whether to encode arrays as repeated value ({@code a=1&a=2}) defaults - * to brackets encoding ({@code a[]=1,2}). - * @return The query string. - */ - public static String createQueryString(Map params, boolean arraysAsRepeated) { if (params == null) { return ""; } Collection> flatParams = - flattenParams(params, arraysAsRepeated).stream() + flattenParams(params).stream() .filter(kvp -> kvp.getValue() instanceof String) .map(kvp -> new KeyValuePair(kvp.getKey(), (String) kvp.getValue())) .collect(Collectors.toList()); @@ -117,13 +105,10 @@ public static String createQueryString( * } * * @param params The map of parameters. - * @param arraysAsRepeated Whether to encode arrays as repeated value ({@code a=1&a=2}) defaults - * to brackets encoding ({@code a[]=1,2}). * @return The flattened list of parameters. */ - public static List> flattenParams( - Map params, boolean arraysAsRepeated) { - return flattenParamsValue(params, null, arraysAsRepeated); + public static List> flattenParams(Map params) { + return flattenParamsValue(params, null); } /** @@ -157,12 +142,10 @@ private static String urlEncode(String value) { * * @param value The value for which to create the list of parameters. * @param keyPrefix The key under which new keys should be nested, if any. - * @param arraysAsRepeated Whether to encode arrays as repeated value ({@code a=1&a=2}) defaults - * to brackets encoding ({@code a[]=1,2}). * @return The list of parameters. */ private static List> flattenParamsValue( - Object value, String keyPrefix, boolean arraysAsRepeated) { + Object value, String keyPrefix) { List> flatParams = null; // I wish Java had pattern matching :( @@ -171,7 +154,7 @@ private static List> flattenParamsValue( flatParams = singleParam(keyPrefix, ""); } else if (value instanceof Map) { - flatParams = flattenParamsMap((Map) value, keyPrefix, arraysAsRepeated); + flatParams = flattenParamsMap((Map) value, keyPrefix); } else if (value instanceof String) { flatParams = singleParam(keyPrefix, value); @@ -183,12 +166,12 @@ private static List> flattenParamsValue( flatParams = singleParam(keyPrefix, value); } else if (value instanceof Collection) { - flatParams = flattenParamsCollection((Collection) value, keyPrefix, arraysAsRepeated); + flatParams = flattenParamsCollection((Collection) value, keyPrefix); } else if (value.getClass().isArray()) { Object[] array = getArrayForObject(value); Collection collection = Arrays.stream(array).collect(Collectors.toList()); - flatParams = flattenParamsCollection(collection, keyPrefix, arraysAsRepeated); + flatParams = flattenParamsCollection(collection, keyPrefix); } else if (value.getClass().isEnum()) { flatParams = @@ -211,7 +194,7 @@ private static List> flattenParamsValue( * @return The list of parameters. */ private static List> flattenParamsMap( - Map map, String keyPrefix, boolean arraysAsRepeated) { + Map map, String keyPrefix) { List> flatParams = new ArrayList>(); if (map == null) { return flatParams; @@ -223,7 +206,7 @@ private static List> flattenParamsMap( String newPrefix = newPrefix(key, keyPrefix); - flatParams.addAll(flattenParamsValue(value, newPrefix, arraysAsRepeated)); + flatParams.addAll(flattenParamsValue(value, newPrefix)); } return flatParams; @@ -236,12 +219,10 @@ private static List> flattenParamsMap( * * @param collection The collection for which to create the list of parameters. * @param keyPrefix The key under which new keys should be nested. - * @param arraysAsRepeated Whether to encode arrays as repeated value ({@code a=1&a=2}) defaults - * to brackets encoding ({@code a[]=1,2}). * @return The list of parameters. */ private static List> flattenParamsCollection( - Collection collection, String keyPrefix, boolean arraysAsRepeated) { + Collection collection, String keyPrefix) { List> flatParams = new ArrayList>(); if (collection == null) { return flatParams; @@ -249,15 +230,16 @@ private static List> flattenParamsCollection( int index = 0; for (Object value : collection) { - String newPrefix = arraysAsRepeated ? keyPrefix : String.format("%s[%d]", keyPrefix, index); - flatParams.addAll(flattenParamsValue(value, newPrefix, arraysAsRepeated)); + // Always use indexed format for arrays + String newPrefix = String.format("%s[%d]", keyPrefix, index); + flatParams.addAll(flattenParamsValue(value, newPrefix)); index += 1; } /* Because application/x-www-form-urlencoded cannot represent an empty list, convention * is to take the list parameter and just set it to an empty string. (E.g. A regular * list might look like `a[0]=1&b[1]=2`. Emptying it would look like `a=`.) */ - if (!arraysAsRepeated && flatParams.isEmpty()) { + if (flatParams.isEmpty()) { flatParams.add(new KeyValuePair(keyPrefix, "")); } diff --git a/src/main/java/com/stripe/net/StripeRequest.java b/src/main/java/com/stripe/net/StripeRequest.java index d30d3e4fc6a..89433bfde9f 100644 --- a/src/main/java/com/stripe/net/StripeRequest.java +++ b/src/main/java/com/stripe/net/StripeRequest.java @@ -71,7 +71,7 @@ private StripeRequest( this.params = (params != null) ? Collections.unmodifiableMap(params) : null; this.options = (options != null) ? options : RequestOptions.getDefault(); this.method = method; - this.url = buildURL(method, url, params, apiMode); + this.url = buildURL(method, url, params); this.headers = buildHeaders(method, this.options, this.content, apiMode); this.apiMode = apiMode; } catch (IOException e) { @@ -107,7 +107,7 @@ private StripeRequest( this.params = (params != null) ? Collections.unmodifiableMap(params) : null; this.options = options; this.method = method; - this.url = buildURL(method, url, params, apiMode); + this.url = buildURL(method, url, params); this.content = buildContent(method, params, apiMode); this.headers = buildHeaders(method, this.options, this.content, apiMode); this.apiMode = apiMode; @@ -219,7 +219,7 @@ public StripeRequest withAdditionalHeader(String name, String value) { } private static URL buildURL( - ApiResource.RequestMethod method, String spec, Map params, ApiMode apiMode) + ApiResource.RequestMethod method, String spec, Map params) throws IOException { StringBuilder sb = new StringBuilder(); @@ -229,8 +229,7 @@ private static URL buildURL( String specQueryString = specUrl.getQuery(); if ((method != ApiResource.RequestMethod.POST) && (params != null)) { - String queryString = - FormEncoder.createQueryString(params, apiMode == ApiMode.V2 ? true : false); + String queryString = FormEncoder.createQueryString(params); if (queryString != null && !queryString.isEmpty()) { if (specQueryString != null && !specQueryString.isEmpty()) { diff --git a/src/test/java/com/stripe/net/FormEncoderTest.java b/src/test/java/com/stripe/net/FormEncoderTest.java index e3e0289628c..65bc3aefc7d 100644 --- a/src/test/java/com/stripe/net/FormEncoderTest.java +++ b/src/test/java/com/stripe/net/FormEncoderTest.java @@ -26,10 +26,8 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.annotation.Nullable; import lombok.AllArgsConstructor; import lombok.Data; -import lombok.RequiredArgsConstructor; import org.hamcrest.CoreMatchers; import org.junit.jupiter.api.Test; @@ -130,12 +128,10 @@ public void testCreateQueryString() { org.junit.Assume.assumeTrue(!System.getProperty("java.version").startsWith("10.")); @Data - @RequiredArgsConstructor @AllArgsConstructor class TestCase { private final Map data; private final String want; - @Nullable private Boolean arrayAsRepeated = false; } List testCases = @@ -376,18 +372,16 @@ class TestCase { "array", new Object[] {new String[] {"foo", "bar"}, new int[] {1, 2, 3}}), "array[0][0]=foo&array[0][1]=bar&array[1][0]=1&array[1][1]=2&array[1][2]=3")); - // Array (arrayAsRepeated) - add(new TestCase(Collections.singletonMap("array", new String[] {}), "", true)); + // Array + add(new TestCase(Collections.singletonMap("array", new String[] {}), "array=")); add( new TestCase( Collections.singletonMap("array", new String[] {"1", "2", "3"}), - "array=1&array=2&array=3", - true)); + "array[0]=1&array[1]=2&array[2]=3")); add( new TestCase( Collections.singletonMap("array", new Object[] {123, "foo"}), - "array=123&array=foo", - true)); + "array[0]=123&array[1]=foo")); // Collection add( new TestCase( @@ -429,9 +423,7 @@ class TestCase { }; for (TestCase testCase : testCases) { - assertEquals( - testCase.getWant(), - FormEncoder.createQueryString(testCase.getData(), testCase.getArrayAsRepeated())); + assertEquals(testCase.getWant(), FormEncoder.createQueryString(testCase.getData())); } } @@ -481,7 +473,7 @@ class TestCase { }; for (TestCase testCase : testCases) { - assertEquals(testCase.getWant(), FormEncoder.flattenParams(testCase.getData(), false)); + assertEquals(testCase.getWant(), FormEncoder.flattenParams(testCase.getData())); } } From 7ce015408d706561af809cc008a5dc6e0169dcf9 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 17:38:05 +0000 Subject: [PATCH 17/17] Update generated code for v2125 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../com/stripe/param/ChargeCaptureParams.java | 79 ++++++++--------- .../com/stripe/param/ChargeUpdateParams.java | 78 ++++++++--------- .../param/PaymentIntentCaptureParams.java | 81 ++++++++++-------- .../param/PaymentIntentConfirmParams.java | 81 ++++++++++-------- .../param/PaymentIntentCreateParams.java | 84 ++++++++++--------- .../param/PaymentIntentUpdateParams.java | 84 ++++++++++--------- 8 files changed, 263 insertions(+), 228 deletions(-) diff --git a/API_VERSION b/API_VERSION index 5e99a21bed7..496024ef527 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -e787557725ee4e24b20d89219f2338f3105a99c8 \ No newline at end of file +a4f6cd305e695abb9ca7cdf25b8828504e2854d7 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ea1ecdee172..927a37ae781 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2124 \ No newline at end of file +v2125 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index 169b5f9a5b2..6c2c4c88207 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -3860,12 +3860,12 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -3880,7 +3880,7 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List taxes; /** Finalize and obtain parameter instance from this builder. */ public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax build() { @@ -3931,7 +3931,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -3946,7 +3946,8 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List + elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -3957,7 +3958,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -3980,7 +3981,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -4001,8 +4002,8 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { - return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax( + public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -4016,8 +4017,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4031,8 +4032,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -7347,11 +7348,11 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxes = taxes; } @@ -7363,7 +7364,7 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List taxes; + private List taxes; /** Finalize and obtain parameter instance from this builder. */ public ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax build() { @@ -7408,7 +7409,7 @@ public Builder putAllExtraParam(Map map) { * documentation. */ public Builder addTax( - ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -7423,7 +7424,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -7434,7 +7435,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -7457,7 +7458,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -7478,8 +7479,8 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax build() { - return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax( + public ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -7493,8 +7494,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -7508,8 +7509,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -10181,12 +10182,12 @@ public static class Tax { /** Tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -10201,7 +10202,7 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List taxes; /** Finalize and obtain parameter instance from this builder. */ public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax build() { @@ -10252,7 +10253,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -10267,7 +10268,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -10278,7 +10279,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -10301,7 +10302,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -10322,8 +10323,8 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { - return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax( + public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -10337,8 +10338,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -10352,8 +10353,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 448ba7c31e9..6a280ffd29a 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -4366,12 +4366,12 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -4386,7 +4386,7 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List taxes; /** Finalize and obtain parameter instance from this builder. */ public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax build() { @@ -4437,7 +4437,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -4452,7 +4452,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -4463,7 +4463,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -4486,7 +4486,7 @@ public static class Tax { @SerializedName("type") Object type; - private Tax(Long amount, Map extraParams, Long rate, Object type) { + private InnerTax(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -4507,8 +4507,8 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { - return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax( + public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -4522,8 +4522,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4537,8 +4537,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -8196,11 +8196,11 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxes = taxes; } @@ -8212,7 +8212,7 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List taxes; + private List taxes; /** Finalize and obtain parameter instance from this builder. */ public ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax build() { @@ -8257,7 +8257,7 @@ public Builder putAllExtraParam(Map map) { * documentation. */ public Builder addTax( - ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -8272,7 +8272,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -8283,7 +8283,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -8306,7 +8306,7 @@ public static class Tax { @SerializedName("type") Object type; - private Tax(Long amount, Map extraParams, Long rate, Object type) { + private InnerTax(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -8327,8 +8327,8 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax build() { - return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax( + public ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -8342,8 +8342,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -8357,8 +8357,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11286,12 +11286,12 @@ public static class Tax { /** Tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -11306,7 +11306,7 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List taxes; /** Finalize and obtain parameter instance from this builder. */ public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax build() { @@ -11357,7 +11357,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -11372,7 +11372,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -11383,7 +11383,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -11406,7 +11406,7 @@ public static class Tax { @SerializedName("type") Object type; - private Tax(Long amount, Map extraParams, Long rate, Object type) { + private InnerTax(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -11427,8 +11427,8 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { - return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax( + public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -11442,8 +11442,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -11457,8 +11457,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} for the - * field documentation. + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 8eee04c6b65..75fecbfd463 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -5545,12 +5545,13 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List + taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -5565,7 +5566,7 @@ public static class Builder { private Boolean taxExemptIndicator; - private List + private List taxes; /** Finalize and obtain parameter instance from this builder. */ @@ -5617,7 +5618,8 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * field documentation. */ public Builder addTax( - PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -5632,7 +5634,7 @@ public Builder addTax( * field documentation. */ public Builder addAllTax( - List + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); @@ -5644,7 +5646,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -5667,7 +5669,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -5688,9 +5690,10 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { - return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax( - this.amount, this.extraParams, this.rate, this.type); + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + build() { + return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax + .InnerTax(this.amount, this.extraParams, this.rate, this.type); } /** Tax amount. */ @@ -5703,7 +5706,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5718,7 +5721,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9071,11 +9074,11 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxes = taxes; } @@ -9087,7 +9090,8 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List taxes; + private List + taxes; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax build() { @@ -9132,7 +9136,7 @@ public Builder putAllExtraParam(Map map) { * documentation. */ public Builder addTax( - PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -9147,7 +9151,8 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List + elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -9158,7 +9163,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -9181,7 +9186,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -9202,8 +9207,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax build() { - return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax( + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax + build() { + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -9217,8 +9223,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9232,8 +9238,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -11934,12 +11940,13 @@ public static class Tax { /** Tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List + taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -11954,7 +11961,8 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List + taxes; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax build() { @@ -12005,7 +12013,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -12020,7 +12028,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); @@ -12032,7 +12040,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -12055,7 +12063,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -12076,8 +12084,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { - return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax( + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax + build() { + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -12091,7 +12100,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12106,7 +12115,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 70885675b3b..b56481c605d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -6276,12 +6276,13 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List + taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -6296,7 +6297,7 @@ public static class Builder { private Boolean taxExemptIndicator; - private List + private List taxes; /** Finalize and obtain parameter instance from this builder. */ @@ -6348,7 +6349,8 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * field documentation. */ public Builder addTax( - PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -6363,7 +6365,7 @@ public Builder addTax( * field documentation. */ public Builder addAllTax( - List + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); @@ -6375,7 +6377,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -6398,7 +6400,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -6419,9 +6421,10 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { - return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.Tax( - this.amount, this.extraParams, this.rate, this.type); + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + build() { + return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax + .InnerTax(this.amount, this.extraParams, this.rate, this.type); } /** Tax amount. */ @@ -6434,7 +6437,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.CarRentalData.Total.Tax.Tax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6449,7 +6452,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9802,11 +9805,11 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxes = taxes; } @@ -9818,7 +9821,8 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List taxes; + private List + taxes; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax build() { @@ -9863,7 +9867,7 @@ public Builder putAllExtraParam(Map map) { * documentation. */ public Builder addTax( - PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -9878,7 +9882,8 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List + elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -9889,7 +9894,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -9912,7 +9917,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -9933,8 +9938,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.Tax build() { - return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.Tax( + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax + build() { + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -9948,8 +9954,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.FlightData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9963,8 +9969,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12665,12 +12671,13 @@ public static class Tax { /** Tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List + taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -12685,7 +12692,8 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List + taxes; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax build() { @@ -12736,7 +12744,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -12751,7 +12759,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); @@ -12763,7 +12771,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -12786,7 +12794,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -12807,8 +12815,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { - return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.Tax( + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax + build() { + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -12822,7 +12831,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.LodgingData.Total.Tax.Tax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12837,7 +12846,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index e783429dd67..dddedc7d9e7 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -6790,12 +6790,13 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List + taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -6810,7 +6811,7 @@ public static class Builder { private Boolean taxExemptIndicator; - private List + private List taxes; /** Finalize and obtain parameter instance from this builder. */ @@ -6862,7 +6863,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -6877,7 +6878,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); @@ -6889,7 +6890,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -6912,7 +6913,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -6933,9 +6934,10 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { - return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.Tax( - this.amount, this.extraParams, this.rate, this.type); + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + build() { + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax + .InnerTax(this.amount, this.extraParams, this.rate, this.type); } /** Tax amount. */ @@ -6948,7 +6950,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6963,7 +6965,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -10313,11 +10315,11 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxes = taxes; } @@ -10329,7 +10331,8 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List taxes; + private List + taxes; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax build() { @@ -10374,7 +10377,7 @@ public Builder putAllExtraParam(Map map) { * documentation. */ public Builder addTax( - PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -10389,7 +10392,8 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List + elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -10400,7 +10404,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -10423,7 +10427,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -10444,8 +10448,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.Tax build() { - return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.Tax( + public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax + build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -10459,8 +10464,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -10474,8 +10479,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -13164,12 +13169,12 @@ public static class Tax { /** Tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -13184,7 +13189,8 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List + taxes; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax build() { @@ -13235,7 +13241,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -13250,7 +13256,8 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List + elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -13261,7 +13268,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -13284,7 +13291,7 @@ public static class Tax { @SerializedName("type") String type; - private Tax(Long amount, Map extraParams, Long rate, String type) { + private InnerTax(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -13305,8 +13312,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { - return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.Tax( + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax + build() { + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -13320,8 +13328,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -13335,8 +13343,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index e676b3c376c..739a22aae52 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -6898,12 +6898,13 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List + taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -6918,7 +6919,7 @@ public static class Builder { private Boolean taxExemptIndicator; - private List + private List taxes; /** Finalize and obtain parameter instance from this builder. */ @@ -6970,7 +6971,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax element) { + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -6985,7 +6986,7 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List + List elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); @@ -6997,7 +6998,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -7020,7 +7021,7 @@ public static class Tax { @SerializedName("type") Object type; - private Tax(Long amount, Map extraParams, Long rate, Object type) { + private InnerTax(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -7041,9 +7042,10 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax build() { - return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax( - this.amount, this.extraParams, this.rate, this.type); + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + build() { + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax + .InnerTax(this.amount, this.extraParams, this.rate, this.type); } /** Tax amount. */ @@ -7056,7 +7058,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -7071,7 +7073,7 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.Tax#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -10765,11 +10767,11 @@ public static class Tax { /** Array of tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxes = taxes; } @@ -10781,7 +10783,8 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List taxes; + private List + taxes; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax build() { @@ -10826,7 +10829,7 @@ public Builder putAllExtraParam(Map map) { * documentation. */ public Builder addTax( - PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax element) { + PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -10841,7 +10844,8 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List + elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -10852,7 +10856,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -10875,7 +10879,7 @@ public static class Tax { @SerializedName("type") Object type; - private Tax(Long amount, Map extraParams, Long rate, Object type) { + private InnerTax(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -10896,8 +10900,9 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax build() { - return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax( + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax + build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -10911,8 +10916,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -10926,8 +10931,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -13874,12 +13879,12 @@ public static class Tax { /** Tax details. */ @SerializedName("taxes") - List taxes; + List taxes; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxes) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; this.taxes = taxes; @@ -13894,7 +13899,8 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List + taxes; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax build() { @@ -13945,7 +13951,7 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { * documentation. */ public Builder addTax( - PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax element) { + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -13960,7 +13966,8 @@ public Builder addTax( * documentation. */ public Builder addAllTax( - List elements) { + List + elements) { if (this.taxes == null) { this.taxes = new ArrayList<>(); } @@ -13971,7 +13978,7 @@ public Builder addAllTax( @Getter @EqualsAndHashCode(callSuper = false) - public static class Tax { + public static class InnerTax { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -13994,7 +14001,7 @@ public static class Tax { @SerializedName("type") Object type; - private Tax(Long amount, Map extraParams, Long rate, Object type) { + private InnerTax(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -14015,8 +14022,9 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax build() { - return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax( + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax + build() { + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( this.amount, this.extraParams, this.rate, this.type); } @@ -14030,8 +14038,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -14045,8 +14053,8 @@ public Builder putExtraParam(String key, Object value) { * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.Tax#extraParams} for - * the field documentation. + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) {